The patch titled Subject: ocfs2: do not fall back to buffer I/O write if appending has been added to the -mm tree. Its filename is ocfs2-do-not-fallback-to-buffer-i-o-write-if-appending.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-do-not-fallback-to-buffer-i-o-write-if-appending.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-do-not-fallback-to-buffer-i-o-write-if-appending.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: WeiWei Wang <wangww631@xxxxxxxxxx> Subject: ocfs2: do not fall back to buffer I/O write if appending After enabling block allocation in direct-io write, we don't fall back to buffer I/O write in append write situation any more. If the O_DIRECT flag is taken, we use direct-io. Signed-off-by: Weiwei Wang <wangww631@xxxxxxxxxx> Cc: Mark Fasheh <mfasheh@xxxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/aops.c | 4 ---- fs/ocfs2/file.c | 11 ----------- 2 files changed, 15 deletions(-) diff -puN fs/ocfs2/aops.c~ocfs2-do-not-fallback-to-buffer-i-o-write-if-appending fs/ocfs2/aops.c --- a/fs/ocfs2/aops.c~ocfs2-do-not-fallback-to-buffer-i-o-write-if-appending +++ a/fs/ocfs2/aops.c @@ -663,10 +663,6 @@ static ssize_t ocfs2_direct_IO(int rw, if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) return 0; - /* Fallback to buffered I/O if we are appending. */ - if (i_size_read(inode) <= offset) - return 0; - if (rw == WRITE) { loff_t final_size = offset + count; /* diff -puN fs/ocfs2/file.c~ocfs2-do-not-fallback-to-buffer-i-o-write-if-appending fs/ocfs2/file.c --- a/fs/ocfs2/file.c~ocfs2-do-not-fallback-to-buffer-i-o-write-if-appending +++ a/fs/ocfs2/file.c @@ -2189,17 +2189,6 @@ static int ocfs2_prepare_inode_for_write } /* - * Allowing concurrent direct writes means - * i_size changes wouldn't be synchronized, so - * one node could wind up truncating another - * nodes writes. - */ - if (end > i_size_read(inode)) { - *direct_io = 0; - break; - } - - /* * We don't fill holes during direct io, so * check for them here. If any are found, the * caller will have to retake some cluster _ Patches currently in -mm which might be from wangww631@xxxxxxxxxx are ocfs2-eliminate-the-static-flag-of-some-functions.patch ocfs2-add-two-functions-of-add-and-remove-inode-in-orphan-dir.patch ocfs2-add-orphan-recovery-types-in-ocfs2_recover_orphans.patch ocfs2-add-and-remove-inode-in-orphan-dir-in-ocfs2_direct_io.patch ocfs2-allocate-blocks-in-ocfs2_direct_io_get_blocks.patch ocfs2-do-not-fallback-to-buffer-i-o-write-if-appending.patch ocfs2-do-not-fallback-to-buffer-i-o-write-if-fill-holes.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html