From: Eric Sandeen <sandeen@sandeen.net>
To: bodonnel@redhat.com, linux-xfs@vger.kernel.org
Cc: djwong@kernel.org, hch@infradead.org
Subject: Re: [PATCH v2] xfs_repair: handling a block with bad crc, bad uuid, and bad magic number needs fixing
Date: Fri, 21 Mar 2025 15:49:59 -0500 [thread overview]
Message-ID: <01ac135a-356f-4590-8a57-58ccae374db5@sandeen.net> (raw)
In-Reply-To: <20250321142848.676719-2-bodonnel@redhat.com>
On 3/21/25 9:28 AM, bodonnel@redhat.com wrote:
> From: Bill O'Donnell <bodonnel@redhat.com>
>
> In certain cases, if a block is so messed up that crc, uuid and magic
> number are all bad, we need to not only detect in phase3 but fix it
> properly in phase6. In the current code, the mechanism doesn't work
> in that it only pays attention to one of the parameters.
>
> Note: in this case, the nlink inode link count drops to 1, but
> re-running xfs_repair fixes it back to 2. This is a side effect that
> should probably be handled in update_inode_nlinks() with separate patch.
> Regardless, running xfs_repair twice fixes the issue. Also, this patch
> fixes the issue with v5, but not v4 xfs.
Nitpick: IIRC V4 filesystems do not have UUIDs in metadata blocks,
so I think this problem is unique to corrupted V5 filesystems.
-Eric
next prev parent reply other threads:[~2025-03-21 20:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 14:28 [PATCH v2] xfs_repair: handling a block with bad crc, bad uuid, and bad magic number needs fixing bodonnel
2025-03-21 15:27 ` Darrick J. Wong
2025-03-21 20:36 ` Bill O'Donnell
2025-03-21 20:39 ` Darrick J. Wong
2025-03-21 23:57 ` Bill O'Donnell
2025-03-21 20:49 ` Eric Sandeen [this message]
2025-03-21 21:57 ` Bill O'Donnell
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=01ac135a-356f-4590-8a57-58ccae374db5@sandeen.net \
--to=sandeen@sandeen.net \
--cc=bodonnel@redhat.com \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=linux-xfs@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