• Filipe Manana's avatar
    Btrfs: set page and mapping error on compressed write failure · 704de49d
    Filipe Manana authored
    If we fail in submit_compressed_extents() before calling btrfs_submit_compressed_write(),
    we start and end the writeback for the pages (clear their dirty flag, unlock them, etc)
    but we don't tag the pages, nor the inode's mapping, with an error. This makes it
    impossible for a caller of filemap_fdatawait_range() (fsync, or transaction commit
    for e.g.) know that there was an error.
    
    Note that the return value of submit_compressed_extents() is useless, as that function
    is executed by a workqueue task and not directly by the fill_delalloc callback. This
    means the writepage/s callbacks of the inode's address space operations don't get that
    return value.
    Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
    Signed-off-by: default avatarChris Mason <clm@fb.com>
    704de49d
extent_io.c 139 KB