ext4: remove page_skipped hackery in ext4_da_writepages()
authorTheodore Ts'o <tytso@mit.edu>
Sat, 26 Feb 2011 19:08:11 +0000 (14:08 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 26 Feb 2011 19:08:11 +0000 (14:08 -0500)
commitee6ecbcc5d73672217fdea420d182ecb0cdf310c
tree4d5b960a2feb20ce1b5866739b39c89dec1c49d8
parent9749895644a817cfd28a535bc3ae60e4267bdc50
ext4: remove page_skipped hackery in ext4_da_writepages()

Because the ext4 page writeback codepath had been prematurely calling
clear_page_dirty_for_io(), if it turned out that a particular page
couldn't be written out during a particular pass of
write_cache_pages_da(), the page would have to get redirtied by
calling redirty_pages_for_writeback().  Not only was this wasted work,
but redirty_page_for_writeback() would increment wbc->pages_skipped to
signal to writeback_sb_inodes() that buffers were locked, and that it
should skip this inode until later.

Since this signal was incorrect in ext4's case --- which was caused by
ext4's historically incorrect use of write_cache_pages() ---
ext4_da_writepages() saved and restored wbc->skipped_pages to avoid
confusing writeback_sb_inodes().

Now that we've fixed ext4 to call clear_page_dirty_for_io() right
before initiating the page I/O, we can nuke the page_skipped
save/restore hackery, and breathe a sigh of relief.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/inode.c