• Eric Sandeen's avatar
    fs-writeback: Add helper function to start writeback if idle · b78a38dc
    Eric Sandeen authored
    commit 17bd55d0
    
     upstream.
    
    ext4, at least, would like to start pushing on writeback if it starts
    to get close to ENOSPC when reserving worst-case blocks for delalloc
    writes.  Writing out delalloc data will convert those worst-case
    predictions into usually smaller actual usage, freeing up space
    before we hit ENOSPC based on this speculation.
    
    Thanks to Jens for the suggestion for the helper function,
    & the naming help.
    
    I've made the helper return status on whether writeback was
    started even though I don't plan to use it in the ext4 patch;
    it seems like it would be potentially useful to test this
    in some cases.
    Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
    Acked-by: default avatarJan Kara <jack@suse.cz>
    Cc: maximilian attems <max@stro.at>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    b78a38dc
fs-writeback.c 33.4 KB