btrfs-progs: receive: properly report lack of zstd support

If zstd is not compiled in then a stream fails with a generic error
message:

ERROR: unknown compression: 2

Where BTRFS_ENCODED_IO_COMPRESSION_ZSTD is 2 and there's a case for that
but behind the '#if COMPRESSION_ZSTD'.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2023-12-07 14:29:54 +01:00
parent 9aafb384cb
commit f8711016eb

View file

@ -1184,8 +1184,8 @@ static int decompress_and_write(struct btrfs_receive *rctx,
if (ret)
goto out;
break;
#if COMPRESSION_ZSTD
case BTRFS_ENCODED_IO_COMPRESSION_ZSTD:
#if COMPRESSION_ZSTD
ret = decompress_zstd(rctx, encoded_data, encoded_len,
unencoded_data, unencoded_len);
if (ret)