linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs-progs: Intelligent item offset/size bit flip detector for dump-tree
@ 2019-04-12  9:05 Qu Wenruo
  2019-04-12  9:05 ` [PATCH 1/2] btrfs-progs: dump-tree: Do simple bit flip check and continue if we can handle it Qu Wenruo
  2019-04-12  9:05 ` [PATCH 2/2] btrfs-progs: misc-tests: Test if dump-tree can handle obviously flipped bit in btrfs item Qu Wenruo
  0 siblings, 2 replies; 3+ messages in thread
From: Qu Wenruo @ 2019-04-12  9:05 UTC (permalink / raw)
  To: linux-btrfs

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

-- 
2.21.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-12  9:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-12  9:05 [PATCH 0/2] btrfs-progs: Intelligent item offset/size bit flip detector for dump-tree Qu Wenruo
2019-04-12  9:05 ` [PATCH 1/2] btrfs-progs: dump-tree: Do simple bit flip check and continue if we can handle it Qu Wenruo
2019-04-12  9:05 ` [PATCH 2/2] btrfs-progs: misc-tests: Test if dump-tree can handle obviously flipped bit in btrfs item Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).