From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs-progs: Detect compressed extent without csum
Date: Mon, 14 May 2018 14:54:41 +0800 [thread overview]
Message-ID: <20180514065444.26313-1-wqu@suse.com> (raw)
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
--
2.17.0
next reply other threads:[~2018-05-14 6:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 6:54 Qu Wenruo [this message]
2018-05-14 6:54 ` [PATCH 1/3] btrfs-progs: check/lowmem: Add checks for compressed extent without csum Qu Wenruo
2018-05-14 6:54 ` [PATCH 2/3] btrfs-progs: check/original: " Qu Wenruo
2018-05-14 6:54 ` [PATCH 3/3] btrfs-progs: fsck-tests: Add test case for detecting " Qu Wenruo
2018-09-11 15:58 ` [PATCH 0/3] btrfs-progs: Detect " David Sterba
2018-09-12 0:08 ` Qu Wenruo
-- strict thread matches above, loose matches on Subject: below --
2018-05-14 7:03 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=20180514065444.26313-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).