From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: fix replace/scrub failure with metadata_uuid
Date: Fri, 11 Aug 2023 17:52:26 +0200 [thread overview]
Message-ID: <20230811155226.GV2420@twin.jikos.cz> (raw)
In-Reply-To: <50a6bd0ecd4e9e2b900de07c8ea47b71959df8ca.1690526680.git.anand.jain@oracle.com>
On Fri, Jul 28, 2023 at 02:48:13PM +0800, Anand Jain wrote:
> Fstests with POST_MKFS_CMD="btrfstune -m" (as in the mailing list)
> reported a few of the test cases failing.
>
> The failure scenario can be summaried and simplified as follows:
>
> $ mkfs.btrfs -fq -draid1 -mraid1 /dev/sdb1 /dev/sdb2 :0
> $ btrfstune -m /dev/sdb1 :0
> $ wipefs -a /dev/sdb1 :0
> $ mount -o degraded /dev/sdb2 /btrfs :0
> $ btrfs replace start -B -f -r 1 /dev/sdb1 /btrfs :1
> STDERR:
> ERROR: ioctl(DEV_REPLACE_START) failed on "/btrfs": Input/output error
>
> [11290.583502] BTRFS warning (device sdb2): tree block 22036480 mirror 2 has bad fsid, has 99835c32-49f0-4668-9e66-dc277a96b4a6 want da40350c-33ac-4872-92a8-4948ed8c04d0
> [11290.586580] BTRFS error (device sdb2): unable to fix up (regular) error at logical 22020096 on dev /dev/sdb8 physical 1048576
>
> As above, the replace is failing because we are verifying the header with
> fs_devices::fsid instead of fs_devices::metadata_uuid, despite the
> metadata_uuid actually being present.
>
> To fix this, use fs_devices::metadata_uuid;
>
> (We copy fsid into fs_devices::metadata_uuid if there is no
> metadata_uuid, so its fine).
>
> Fixes: a3ddbaebc7c9 ("btrfs: scrub: introduce a helper to verify one metadata block")
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
Added to misc-next, thanks.
prev parent reply other threads:[~2023-08-11 15:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 6:48 [PATCH] btrfs: fix replace/scrub failure with metadata_uuid Anand Jain
2023-08-01 7:45 ` Anand Jain
2023-08-11 15:52 ` David Sterba [this message]
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=20230811155226.GV2420@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=anand.jain@oracle.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