Skip to content
Commit 60e1975a authored by Zach Brown's avatar Zach Brown Committed by Chris Mason
Browse files

btrfs: return errno instead of -1 from compression



The compression layer seems to have been built to return -1 and have
callers make up errors that make sense.  This isn't great because there
are different errors that originate down in the compression layer.

Let's return real negative errnos from the compression layer so that
callers can pass on the error without having to guess what happened.
ENOMEM for allocation failure, E2BIG when compression exceeds the
uncompressed input, and EIO for everything else.

This helps a future path return errors from btrfs_decompress().

Signed-off-by: default avatarZach Brown <zab@redhat.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 98806b44
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment