btrfs: track compressed bio errors as blk_status_t
authorJosef Bacik <josef@toxicpanda.com>
Thu, 10 Feb 2022 22:44:23 +0000 (17:44 -0500)
committerDavid Sterba <dsterba@suse.com>
Tue, 15 Feb 2022 15:55:32 +0000 (16:55 +0100)
commitd1e5bf4e1242823afdffa57731666e3afeb12336
tree3727be0aa1447a547e93b6634c2104bf3976ed70
parent8f79c103fe603e5918faa2ce07a314d594b6cdf9
btrfs: track compressed bio errors as blk_status_t

Right now we just have a binary "errors" flag, so any error we get on
the compressed bio's gets translated to EIO.  This isn't necessarily a
bad thing, but if we get an ENOMEM it may be nice to know that's what
happened instead of an EIO.  Track our errors as a blk_status_t, and do
the appropriate setting of the errors accordingly.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c
fs/btrfs/compression.h