writeback: kupdate writeback shall not stop when more io is possible
authorWu Fengguang <fengguang.wu@intel.com>
Wed, 23 Sep 2009 12:33:41 +0000 (20:33 +0800)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 25 Sep 2009 16:08:25 +0000 (18:08 +0200)
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>
fs/fs-writeback.c

index 476be9b10881ca947cfcd7e79d55c84563dba353..551684de13924dc256d89bb3b7ce175a02b73fdf 100644 (file)
@@ -753,8 +753,8 @@ static long wb_writeback(struct bdi_writeback *wb,
                /*
                 * If we ran out of stuff to write, bail unless more_io got set
                 */
-               if (wbc.nr_to_write > 0 || wbc.pages_skipped > 0) {
-                       if (wbc.more_io && !wbc.for_kupdate) {
+               if (wbc.nr_to_write > 0) {
+                       if (wbc.more_io) {
                                if (wbc.nr_to_write < MAX_WRITEBACK_PAGES)
                                        continue;
                                /*