btrfs-progs: Detect compressed extent without csum
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs-progs: check/lowmem: Add checks for compressed extent without csumcheck/ | +18 | 0 replies | |
| 2/3 | btrfs-progs: check/original: Add checks for compressed extent without csumcheck/ | +8 | 0 replies | |
| 3/3 | btrfs-progs: fsck-tests: Add test case for detecting compressed extent without csumtests/ tests/ | +24 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] btrfs-progs: Detect compressed extent without csum
Patches can be fetch from github:
https://github.com/adam900710/btrfs-progs/tree/compress_nodatasum
It's based on v4.16 stable branch.
James Harvey from mail list reports a strange kernel panic, whichs show obviously kernel memory corruption, while after btrfs decompression failure.
It turns out that, some compressed extent get corrupted on-disk, while the inode has NODATASUM set, there is no csum to prevent corrupted mirror being used.
Although the root cause should be buggy lzo implementation, it still shows that btrfs is not following the behavior defined in btrfs(5):
Note
If nodatacow or nodatasum are enabled, compression is disabled.
So at least make btrfs check to detect such problem.
Qu Wenruo (3):
btrfs-progs: check/lowmem: Add checks for compressed extent without
csum
btrfs-progs: check/original: Add checks for compressed extent without
csum
btrfs-progs: fsck-tests: Add test case for detecting compressed extent
without csum
check/main.c | 10 ++++++-- check/mode-lowmem.c | 18 +++++++++++++ .../compressed_extent_without_csum.raw.xz | Bin 0 -> 21996 bytes .../032-compressed-nodatasum/test.sh | 24 ++++++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 tests/fsck-tests/032-compressed-nodatasum/compressed_extent_without_csum.raw.xz create mode 100755 tests/fsck-tests/032-compressed-nodatasum/test.sh
Signature · 1 line
2.17.0