The patch titled skip writing data pages when inode is under I_SYNC has been added to the -mm tree. Its filename is skip-writing-data-pages-when-inode-is-under-i_sync.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: skip writing data pages when inode is under I_SYNC From: Qi Yong <qiyong@xxxxxxxxx> Since I_SYNC was split out from I_LOCK, the concern in commit 4b89eed93e0fa40a63e3d7b1796ec1337ea7a3aa is not longer valid. We should revert to the original behavior: in __writeback_single_inode(), when we find an I_SYNC-ed inode and we're not doing a data-integrity sync, skip writing entirely. Otherwise, we are double calling do_writepages() Signed-off-by: Qi Yong <qiyong@xxxxxxxxx> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Cc: Hugh Dickins <hugh@xxxxxxxxxxx> Cc: Joern Engel <joern@xxxxxxxxxxxxxxxxxxxx> Cc: WU Fengguang <wfg@xxxxxxxxxxxxxxxx> Cc: Michael Rubin <mrubin@xxxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/fs-writeback.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff -puN fs/fs-writeback.c~skip-writing-data-pages-when-inode-is-under-i_sync fs/fs-writeback.c --- a/fs/fs-writeback.c~skip-writing-data-pages-when-inode-is-under-i_sync +++ a/fs/fs-writeback.c @@ -334,9 +334,6 @@ __writeback_single_inode(struct inode *i WARN_ON(inode->i_state & I_WILL_FREE); if ((wbc->sync_mode != WB_SYNC_ALL) && (inode->i_state & I_SYNC)) { - struct address_space *mapping = inode->i_mapping; - int ret; - /* * We're skipping this inode because it's locked, and we're not * doing writeback-for-data-integrity. Move it to s_more_io so @@ -345,15 +342,7 @@ __writeback_single_inode(struct inode *i * completed a full scan of s_io. */ requeue_io(inode); - - /* - * Even if we don't actually write the inode itself here, - * we can at least start some of the data writeout.. - */ - spin_unlock(&inode_lock); - ret = do_writepages(mapping, wbc); - spin_lock(&inode_lock); - return ret; + return 0; } /* _ Patches currently in -mm which might be from qiyong@xxxxxxxxx are skip-writing-data-pages-when-inode-is-under-i_sync.patch kill-an-unused-ptr_err-in-bdev_cache_init.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