btrfs: track compressed bio errors as blk_status_t
authorJosef Bacik <josef@toxicpanda.com>
Fri, 18 Feb 2022 15:03:26 +0000 (10:03 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Mar 2022 12:13:51 +0000 (13:13 +0100)
commit606f82e797e26013c80d25790639587a5d4dfbb7
tree73db2fa06529a730109fc8da2f850104741d2490
parente14bfdb5a1f5fbb0a45f64a763c8da00637072d1
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