linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs-progs: Intelligent item offset/size bit flip detector for dump-tree
Date: Fri, 12 Apr 2019 17:05:28 +0800	[thread overview]
Message-ID: <20190412090530.29132-1-wqu@suse.com> (raw)

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


             reply	other threads:[~2019-04-12  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12  9:05 Qu Wenruo [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190412090530.29132-1-wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).