From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Chandan Babu R <chandanbabu@kernel.org>, xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: allow unlinked symlinks and dirs with zero size
Date: Mon, 10 Jun 2024 14:07:23 -0700 [thread overview]
Message-ID: <20240610210723.GU52987@frogsfrogsfrogs> (raw)
In-Reply-To: <ZmVMn3Gu-hP3AMEI@infradead.org>
On Sat, Jun 08, 2024 at 11:33:03PM -0700, Christoph Hellwig wrote:
> On Fri, Jun 07, 2024 at 09:12:17AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > For a very very long time, inode inactivation has set the inode size to
> > zero before unmapping the extents associated with the data fork.
> > Unfortunately, newer commit 3c6f46eacd876 changed the inode verifier to
> > prohibit zero-length symlinks and directories. If an inode happens to
>
> ", newer commit" above reads really odd. Maybe just drop the "newer "?
>
> > + if ((S_ISLNK(mode) || S_ISDIR(mode)) && di_size == 0) {
> > + if (dip->di_version > 1) {
> > + if (dip->di_nlink)
> > + return __this_address;
> > + else
> > + ASSERT(0);
> > + } else {
> > + if (dip->di_onlink)
> > + return __this_address;
> > + else
> > + ASSERT(0);
> > + }
>
> No need for else after a return.
>
> With that fixed:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
It turns out that even this is still buggy because directories that are
being inactivated (e.g. after repair has replaced the contents) can have
zero isize. Sooo I'll have a new patch in a day or two.
--D
next prev parent reply other threads:[~2024-06-10 21:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 16:12 [PATCH] xfs: allow unlinked symlinks and dirs with zero size Darrick J. Wong
2024-06-09 6:33 ` Christoph Hellwig
2024-06-10 21:07 ` Darrick J. Wong [this message]
2024-06-11 4:50 ` Christoph Hellwig
2024-06-11 6:07 ` 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=20240610210723.GU52987@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=chandanbabu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.