From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v3 0/6] btrfs-progs: check: Detect invalid dev extents and device items
Date: Mon, 8 Oct 2018 20:30:38 +0800 [thread overview]
Message-ID: <20181008123044.13413-1-wqu@suse.com> (raw)
This patchset can be fetch from github:
https://github.com/adam900710/btrfs-progs/tree/dev_extents_check
Hans van Kranenburg reported a case where btrfs DUP chunk allocator
could allocate invalid dev extents, either overlaps with existing dev
extents or beyond device boundary.
This patchset enhances the btrfs-progs side to detect such problems.
With hand crafted test image for it.
Link: https://www.spinics.net/lists/linux-btrfs/msg82370.html
Changelog:
v2:
Fix a bug in the 1st patch which makes lowmem mode never checks
overlap dev extents.
Fix test case bug which never passes due to wrong script.
v3:
Add btrfs-image fixes to make test cases happy.
Qu Wenruo (6):
btrfs-progs: image: Use correct device size when restoring
btrfs-progs: lowmem check: Add check for overlapping dev extents
btrfs-progs: original check: Add ability to detect bad dev extents
btrfs-progs: lowmem check: Add dev_item check for used bytes and total
bytes
btrfs-progs: original check: Add dev_item check for used bytes and
total bytes
btrfs-progs: fsck-tests: Add test image for dev extents beyond device
boundary
check/main.c | 105 ++++++++++++++++++
check/mode-lowmem.c | 39 ++++++-
image/main.c | 48 +++++++-
.../over_dev_boundary.img.xz | Bin 0 -> 1640 bytes
tests/fsck-tests/036-bad-dev-extents/test.sh | 20 ++++
5 files changed, 207 insertions(+), 5 deletions(-)
create mode 100644 tests/fsck-tests/036-bad-dev-extents/over_dev_boundary.img.xz
create mode 100755 tests/fsck-tests/036-bad-dev-extents/test.sh
--
2.19.1
next reply other threads:[~2018-10-08 12:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-08 12:30 Qu Wenruo [this message]
2018-10-08 12:30 ` [PATCH v3 1/6] btrfs-progs: image: Use correct device size when restoring Qu Wenruo
2018-10-11 12:07 ` Nikolay Borisov
2018-10-12 5:20 ` Qu Wenruo
2018-10-08 12:30 ` [PATCH v3 2/6] btrfs-progs: lowmem check: Add check for overlapping dev extents Qu Wenruo
2018-10-09 1:46 ` Su Yue
2018-10-08 12:30 ` [PATCH v3 3/6] btrfs-progs: original check: Add ability to detect bad " Qu Wenruo
2018-10-09 2:01 ` Su Yue
2018-10-08 12:30 ` [PATCH v3 4/6] btrfs-progs: lowmem check: Add dev_item check for used bytes and total bytes Qu Wenruo
2018-10-08 22:20 ` Hans van Kranenburg
2018-10-09 1:14 ` Qu Wenruo
2018-10-09 20:21 ` Hans van Kranenburg
2018-10-08 12:30 ` [PATCH v3 5/6] btrfs-progs: original " Qu Wenruo
2018-10-08 12:30 ` [PATCH v3 6/6] btrfs-progs: fsck-tests: Add test image for dev extents beyond device boundary Qu Wenruo
2018-12-17 18:55 ` [PATCH v3 0/6] btrfs-progs: check: Detect invalid dev extents and device items David Sterba
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=20181008123044.13413-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).