From: Vladimir Saveliev Date: Tue, 26 Dec 2017 19:49:58 +0000 (+0300) Subject: LU-10356 llite: have ll_write_end to sync for DIO X-Git-Tag: 2.10.59~91 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=6ea9171769db602b3a2b34419bdafacd38454cb4;p=fs%2Flustre-release.git LU-10356 llite: have ll_write_end to sync for DIO direct IO write uses buffered write for pages which could not be released. If not adjacent pages are not releasable, vio->u.write.vui_queue list becomes non-contiguos which makes page_list_sanity_check() to fail. Have ll_write_commit to do vvp_io_write_commit() when it is called in course of direct IO. Cray-bug-id: MRP-4415 Signed-off-by: Vladimir Saveliev Change-Id: I21e653c4d45553c85ff5ded8edf22017966c7ba4 Reviewed-on: https://review.whamcloud.com/30659 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jinshan Xiong Reviewed-by: Alexey Lyashkov Reviewed-by: Andrew Perepechko Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c index 2f1008b..b8deb17 100644 --- a/lustre/llite/rw26.c +++ b/lustre/llite/rw26.c @@ -876,8 +876,7 @@ static int ll_write_end(struct file *file, struct address_space *mapping, /* page list is not contiguous now, commit it now */ unplug = true; } - if (unplug || - file->f_flags & O_SYNC || IS_SYNC(file_inode(file))) + if (unplug || io->u.ci_rw.rw_sync) result = vvp_io_write_commit(env, io); if (result < 0)