From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org,
"Luca Béla Palkovics" <luca.bela.palkovics@gmail.com>
Subject: Re: [PATCH 1/2] btrfs-progs: check: add check and repair ability for super num devs mismatch
Date: Wed, 23 Mar 2022 18:43:15 +0100 [thread overview]
Message-ID: <20220323174315.GC2237@twin.jikos.cz> (raw)
In-Reply-To: <029df99dabfee5b8fc602bf284bb3ea364176418.1646009185.git.wqu@suse.com>
On Mon, Feb 28, 2022 at 08:50:07AM +0800, Qu Wenruo wrote:
> [BUG]
> There is a bug report of kernel rejecting fs which has a mismatch in
> super num devices and num devices found in chunk tree.
>
> But btrfs-check reports no problem about the fs.
>
> [CAUSE]
> We just didn't verify super num devices against the result found in
> chunk tree.
>
> [FIX]
> Add such check and repair ability for btrfs-check.
>
> The ability is mode independent.
>
> Reported-by: Luca Béla Palkovics <luca.bela.palkovics@gmail.com>
> Link: https://lore.kernel.org/linux-btrfs/CA+8xDSpvdm_U0QLBAnrH=zqDq_cWCOH5TiV46CKmp3igr44okQ@mail.gmail.com/
> Signed-off-by: Qu Wenruo <wqu@suse.com>
With this patch applied there's a new test failure:
=== START TEST .../tests/fsck-tests/014-no-extent-info
testing image no_extent.raw.restored
====== RUN MUSTFAIL .../btrfs check ./no_extent.raw.restored
Opening filesystem to check...
Checking filesystem on ./no_extent.raw.restored
UUID: aeee7297-37a4-4547-a8a9-7b870d58d31f
cache and super generation don't match, space cache will be invalidated
found 180224 bytes used, no error found
total csum bytes: 0
total tree bytes: 180224
total fs tree bytes: 81920
total extent tree bytes: 16384
btree space waste bytes: 138540
file data blocks allocated: 0
referenced 0
succeeded (unexpected!): .../btrfs check ./no_extent.raw.restored
unexpected success: btrfs check should have detected corruption
next prev parent reply other threads:[~2022-03-23 17:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 0:50 [PATCH 0/2] btrfs-progs: add check and repair ability for super num devices mismatch Qu Wenruo
2022-02-28 0:50 ` [PATCH 1/2] btrfs-progs: check: add check and repair ability for super num devs mismatch Qu Wenruo
2022-03-23 17:43 ` David Sterba [this message]
2022-03-23 23:15 ` Qu Wenruo
2022-03-23 23:38 ` Qu Wenruo
2022-02-28 0:50 ` [PATCH 2/2] btrfs-progs: tests/fsck: add test case " Qu Wenruo
2022-03-23 17:12 ` [PATCH 0/2] btrfs-progs: add check and repair ability for super num devices mismatch David Sterba
2022-03-23 17:17 ` David Sterba
2022-03-23 23:30 ` Qu Wenruo
2022-03-24 15:12 ` 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=20220323174315.GC2237@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=luca.bela.palkovics@gmail.com \
--cc=wqu@suse.com \
/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