From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/9] xfs: repair inode records
Date: Mon, 11 Dec 2023 12:04:58 -0800 [thread overview]
Message-ID: <20231211200458.GU361584@frogsfrogsfrogs> (raw)
In-Reply-To: <ZXFbHDCxAkFq1OXT@infradead.org>
On Wed, Dec 06, 2023 at 09:41:48PM -0800, Christoph Hellwig wrote:
> On Wed, Dec 06, 2023 at 06:42:44PM -0800, Darrick J. Wong wrote:
> > #define XFS_DFORK_DPTR(dip) \
> > - ((char *)dip + xfs_dinode_size(dip->di_version))
> > + ((void *)dip + xfs_dinode_size(dip->di_version))
> > #define XFS_DFORK_APTR(dip) \
> > (XFS_DFORK_DPTR(dip) + XFS_DFORK_BOFF(dip))
> > #define XFS_DFORK_PTR(dip,w) \
>
> > + if (XFS_DFORK_BOFF(dip) >= mp->m_sb.sb_inodesize)
> > xchk_ino_set_corrupt(sc, ino);
>
> This should be a prep patch.
Done.
> Otherwise I'm still a bit worried about the symlink pointing to ?
> and suspect we need a clear and documented strategy for things that
> can change data for applications before doing something like that.
For a brief second I thought about adding another ZAPPED health flag,
like I just did for the data/attr forks. Then I realized that for
symbolic link targets this doesn't make sense because we've lost the
target data so there's no extended recovery that can be applied.
Unfortunately this leaves me stuck because targets are arbitrary null
terminated strings, so there's no bulletproof way to communicate "target
has been lost, do not try to follow this path" without risking that the
same directory actually contains a file with that name.
At this point, we can't even iget the dead symlink to find the parent
pointers so we can delete the inode from the directory tree, so that's
also not an option.
> The rest looks good to me.
Oh good. :)
--D
next prev parent reply other threads:[~2023-12-11 20:04 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 2:38 [PATCHSET v28.1 0/9] xfs: online repair of inodes and forks Darrick J. Wong
2023-12-07 2:41 ` [PATCH 1/9] xfs: disable online repair quota helpers when quota not enabled Darrick J. Wong
2023-12-07 2:42 ` [PATCH 2/9] xfs: try to attach dquots to files before repairing them Darrick J. Wong
2023-12-07 2:42 ` [PATCH 3/9] xfs: add missing nrext64 inode flag check to scrub Darrick J. Wong
2023-12-07 5:31 ` Christoph Hellwig
2023-12-07 2:42 ` [PATCH 4/9] xfs: repair inode records Darrick J. Wong
2023-12-07 5:41 ` Christoph Hellwig
2023-12-11 20:04 ` Darrick J. Wong [this message]
2023-12-12 5:36 ` Christoph Hellwig
2023-12-13 1:36 ` Darrick J. Wong
2023-12-07 2:43 ` [PATCH 5/9] xfs: zap broken inode forks Darrick J. Wong
2023-12-07 6:00 ` Christoph Hellwig
2023-12-07 6:01 ` Christoph Hellwig
2023-12-07 2:43 ` [PATCH 6/9] xfs: set inode sick state flags when we zap either ondisk fork Darrick J. Wong
2023-12-07 5:58 ` Christoph Hellwig
2023-12-11 22:48 ` Darrick J. Wong
2023-12-07 2:43 ` [PATCH 7/9] xfs: abort directory parent scrub scans if we encounter a zapped directory Darrick J. Wong
2023-12-07 6:03 ` Christoph Hellwig
2023-12-11 19:19 ` Darrick J. Wong
2023-12-07 2:43 ` [PATCH 8/9] xfs: skip the rmapbt search on an empty attr fork unless we know it was zapped Darrick J. Wong
2023-12-07 6:07 ` Christoph Hellwig
2023-12-11 22:50 ` Darrick J. Wong
2023-12-07 2:44 ` [PATCH 9/9] xfs: repair obviously broken inode modes Darrick J. Wong
2023-12-07 6:10 ` Christoph Hellwig
2023-12-11 22:19 ` Darrick J. Wong
2023-12-12 5:35 ` Christoph Hellwig
2023-12-13 1:04 ` Darrick J. Wong
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=20231211200458.GU361584@frogsfrogsfrogs \
--to=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