• Theodore Ts'o's avatar
    ext4: remove page_skipped hackery in ext4_da_writepages() · ee6ecbcc
    Theodore Ts'o authored
    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: default avatar"Theodore Ts'o" <tytso@mit.edu>
    ee6ecbcc
inode.c 170 KB