aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-09-23 08:33:41 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-09-25 12:08:25 -0400
commit7fbdea32328312c65870c397a0a436c3226c8631 (patch)
treea92cbf127bca8925afd7c2b22b372d02b32e48f3
parentd3ddec7635b6fb37cb49e3553bdeea59642be653 (diff)
writeback: kupdate writeback shall not stop when more io is possible
Fix the kupdate case, which disregards wbc.more_io and stop writeback prematurely even when there are more inodes to be synced. wbc.more_io should always be respected. Also remove the pages_skipped check. It will set when some page(s) of some inode(s) cannot be written for now. Such inodes will be delayed for a while. This variable has nothing to do with whether there are other writeable inodes. CC: Jan Kara <jack@suse.cz> CC: Dave Chinner <david@fromorbit.com> CC: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--fs/fs-writeback.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 476be9b10881..551684de1392 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -753,8 +753,8 @@ static long wb_writeback(struct bdi_writeback *wb,
753 /* 753 /*
754 * If we ran out of stuff to write, bail unless more_io got set 754 * If we ran out of stuff to write, bail unless more_io got set
755 */ 755 */
756 if (wbc.nr_to_write > 0 || wbc.pages_skipped > 0) { 756 if (wbc.nr_to_write > 0) {
757 if (wbc.more_io && !wbc.for_kupdate) { 757 if (wbc.more_io) {
758 if (wbc.nr_to_write < MAX_WRITEBACK_PAGES) 758 if (wbc.nr_to_write < MAX_WRITEBACK_PAGES)
759 continue; 759 continue;
760 /* 760 /*