]> git.hungrycats.org Git - linux/commit
Btrfs: don't ignore compressed bio write errors
authorFilipe Manana <fdmanana@suse.com>
Tue, 7 Oct 2014 00:48:26 +0000 (01:48 +0100)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Fri, 23 Jan 2015 13:16:33 +0000 (08:16 -0500)
commita3569e51bcde4976ef31de4651f7f0f68ecae2ad
tree1f51990965917d080e4d29a0dd4886419ba98784
parentb406ccae8d64c6879318b2b602a3a415f1f9029a
Btrfs: don't ignore compressed bio write errors

Our compressed bio write end callback was essentially ignoring the error
parameter. When a write error happens, it must pass a value of 0 to the
inode's write_page_end_io_hook callback, SetPageError on the respective
pages and set AS_EIO in the inode's mapping flags, so that a call to
filemap_fdatawait_range() / filemap_fdatawait() can find out that errors
happened (we surely don't want silent failures on fsync for example).

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
(cherry picked from commit 7bdcefc103849386ef7f3029dd94ecfd4a822a67)
fs/btrfs/compression.c