btrfs: handle unknown compression instead of panicking

Instead of triggering a Kernel Debugging Land (KDL) session when
encountering an unsupported compression type (like ZSTD), the driver
now returns B_NOT_SUPPORTED and logs an error.

This keeps the system stable and allows the VFS to handle the error
gracefully.

Fixes #19914

Change-Id: I5f43eef1c04982014430de63f3840af0d6cfefb0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10263
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Abdullah Zulfiqar
2026-01-24 15:12:08 +00:00
committed by waddlesplash
parent 22a91d557c
commit d52ea5c8d2
@@ -257,7 +257,7 @@ Inode::ReadAt(off_t pos, uint8* buffer, size_t* _length)
else if (compression == BTRFS_EXTENT_COMPRESS_ZLIB)
panic("zlib isn't unsupported for regular extent\n");
else
panic("unknown extent compression; %d\n", compression);
ERROR("unknown extent compression; %d\n", compression);
return B_BAD_DATA;
}
@@ -347,8 +347,8 @@ Inode::ReadAt(off_t pos, uint8* buffer, size_t* _length)
*_length = zStream.total_out;
} else {
panic("unknown extent compression; %d\n", compression);
return B_BAD_DATA;
ERROR("unknown extent compression; %d\n", compression);
return B_NOT_SUPPORTED;
}
return B_OK;