fs: Fix busyloop in wb_writeback()
authorJan Kara <jack@suse.cz>
Wed, 16 Sep 2009 17:22:48 +0000 (19:22 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 25 Sep 2009 16:08:24 +0000 (18:08 +0200)
commita5989bdc981ec85e0734ac22519cc0b780813d7b
tree74cc93bd420b7bd044e3fd5451c652b3742015e6
parent7fa07729e439a6184bd824746d06a49cca553f15
fs: Fix busyloop in wb_writeback()

If all inodes are under writeback (e.g. in case when there's only one inode
with dirty pages), wb_writeback() with WB_SYNC_NONE work basically degrades
to busylooping until I_SYNC flags of the inode is cleared. Fix the problem by
waiting on I_SYNC flags of an inode on b_more_io list in case we failed to
write anything.

Tested-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fs/fs-writeback.c