• Aneesh Kumar K.V's avatar
    ext4: Rework the ext4_da_writepages() function · a1d6cc56
    Aneesh Kumar K.V authored
    With the below changes we reserve credit needed to insert only one
    extent resulting from a call to single get_block.  This makes sure we
    don't take too much journal credits during writeout.  We also don't
    limit the pages to write.  That means we loop through the dirty pages
    building largest possible contiguous block request.  Then we issue a
    single get_block request.  We may get less block that we requested.  If
    so we would end up not mapping some of the buffer_heads.  That means
    those buffer_heads are still marked delay.  Later in the writepage
    callback via __mpage_writepage we redirty those pages.
    
    We should also not limit/throttle wbc->nr_to_write in the filesystem
    writepages callback. That cause wrong behaviour in
    generic_sync_sb_inodes caused by wbc->nr_to_write being <= 0
    Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
    Reviewed-by: default avatarMingming Cao <cmm@us.ibm.com>
    Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
    a1d6cc56
inode.c 137 KB