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, 28 Feb 2022 15:20:03 +0000 (16:20 +0100)
commitefaa3b219b963932bc6d40570c7973e3606486ec
treeb04d8478fa0f13dd123a5f5fee12b54aacc34860
parent5a5e8540524b86eabdab0b6599abf344e607944f
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