Skip to content

btrfs-progs: Intelligent item offset/size bit flip detector for dump-tree

Qu Wenruo linux-btrfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs-progs: dump-tree: Do simple bit flip check and continue if we can handle itprint-tree.c+81 -190 replies
2/2btrfs-progs: misc-tests: Test if dump-tree can handle obviously flipped bit in btrfs itemtests/misc-tests/036-dump-tree-bit-flip/test.sh tests/misc-tests/036-dump-tree-bit-flip/two_corrupted_items.raw.xz+21 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] btrfs-progs: Intelligent item offset/size bit flip detector for dump-tree

This will make dump-tree less dumb when it gets some item offset/size bit flip.

The output example can be found in the first patch, and the 2nd patch is the test case to ensure it works as expected.

The design goal is to make debugging a little easier, I don't think bit flip handler should be fixed in btrfs-progs directly, as the complexity isn't worthy.
We should ensure it's not btrfs or some other strange kernel module modifying eb memory in the first place.

So only dump-tree supports item size/offset bit flip detection, just to make debugging a little easier.

Qu Wenruo (2):
btrfs-progs: dump-tree: Do simple bit flip check and continue if we
can handle it
btrfs-progs: misc-tests: Test if dump-tree can handle obviously
flipped bit in btrfs item

 print-tree.c                                  | 100 ++++++++++++++----
 .../misc-tests/036-dump-tree-bit-flip/test.sh |  21 ++++
 .../two_corrupted_items.raw.xz                | Bin 0 -> 22024 bytes
 3 files changed, 102 insertions(+), 19 deletions(-)
 create mode 100755 tests/misc-tests/036-dump-tree-bit-flip/test.sh
 create mode 100644 tests/misc-tests/036-dump-tree-bit-flip/two_corrupted_items.raw.xz
Signature · 1 line
2.21.0