From: Eric Sandeen Date: Thu, 28 Oct 2010 01:30:13 +0000 (-0400) Subject: ext4: update writeback_index based on last page scanned X-Git-Tag: v2.6.37-rc1~76^2^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72f84e6560d18d60a091df27edf81409be6641cb;p=pandora-kernel.git ext4: update writeback_index based on last page scanned As pointed out in a prior patch, updating the mapping's writeback_index based on pages written isn't quite right; what the writeback index is really supposed to reflect is the next page which should be scanned for writeback during periodic flush. As in write_cache_pages(), write_cache_pages_da() does this scanning for us as we assemble the mpd for later writeout. If we keep track of the next page after the current scan, we can easily update writeback_index without worrying about pages written vs. pages skipped, etc. Without this, an fsync will reset writeback_index to 0 (its starting index) + however many pages it wrote, which can mess up the progress of periodic flush. Signed-off-by: Eric Sandeen Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed