Message ID | 1412885744-16180-1-git-send-email-fdmanana@suse.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7635b1d..b91a171 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -538,6 +538,7 @@ cont: clear_flags, PAGE_UNLOCK | PAGE_CLEAR_DIRTY | PAGE_SET_WRITEBACK | + PAGE_SET_ERROR | PAGE_END_WRITEBACK); goto free_pages_out; }
If cow_file_range_inline() failed, when called from compress_file_range(), we were tagging the locked page for writeback, end its writeback and unlock it, but not marking it with an error nor setting AS_EIO in inode's mapping flags. This made it impossible for a caller of filemap_fdatawrite_range (writepages) or filemap_fdatawait_range() to know that an error happened. And the return value of compress_file_range() is useless because it's returned to a workqueue task and not to the task calling filemap_fdatawrite_range (writepages). This change applies on top of the previous patchset starting at the patch titled: "[1/5] Btrfs: set page and mapping error on compressed write failure" Which changed extent_clear_unlock_delalloc() to use SetPageError and mapping_set_error(). Signed-off-by: Filipe Manana <fdmanana@suse.com> --- fs/btrfs/inode.c | 1 + 1 file changed, 1 insertion(+)