From: Al Viro <viro@zeniv.linux.org.uk>
To: Theodore Ts'o <tytso@mit.edu>
Cc: kernel@collabora.com, linux-f2fs-devel@lists.sourceforge.net,
ebiggers@kernel.org, linux-fsdevel@vger.kernel.org,
jaegeuk@kernel.org, linux-ext4@vger.kernel.org,
Gabriel Krisman Bertazi <krisman@collabora.com>
Subject: Re: [f2fs-dev] [PATCH 1/7] fs: Expose name under lookup to d_revalidate hook
Date: Sun, 26 Mar 2023 06:03:49 +0100 [thread overview]
Message-ID: <20230326050349.GE3390869@ZenIV> (raw)
In-Reply-To: <ZB74FsfDDUegrqqx@mit.edu>
On Sat, Mar 25, 2023 at 09:33:10AM -0400, Theodore Ts'o wrote:
> On Thu, Mar 23, 2023 at 10:33:20AM -0400, Theodore Ts'o wrote:
> > On Wed, Jun 22, 2022 at 03:45:57PM -0400, Gabriel Krisman Bertazi wrote:
> > > Negative dentries support on case-insensitive ext4/f2fs will require
> > > access to the name under lookup to ensure it matches the dentry. This
> > > adds an optional new flavor of cached dentry revalidation hook to expose
> > > this extra parameter.
> > >
> > > I'm fine with extending d_revalidate instead of adding a new hook, if
> > > it is considered cleaner and the approach is accepted. I wrote a new
> > > hook to simplify reviewing.
> > >
> > > Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
> >
> > Reviewed-by: Theodore Ts'o <tytso@mit.edu>
> >
> > Al, could you take a look and see if you have any objections?
>
> Ping, Al, any objsections if I take Gabriel's patch series via the
> ext4 tree?
The really subtle part is ->d_name stability in there. We probably are OK
as it is with the current tree (at least I hope so), but it really needs
to be documented - the proof of correctness is not straightforward and it's
going to be brittle; it's not obvious that this memcmp() relies upon the
parent being locked in all cases when we get to calling it. And if that
ever becomes not true, we have a hard-to-debug source of occasional oopsen ;-/
It can be done without reliance on locking - take a look at the vicinity of
dentry_cmp() in fs/dcache.c for example of such, but it's very much not
a blind memcmp(). And I suspect that it would be an overkill here.
In any case, that needs to be discussed in commit message and clearly
spelled out. Otherwise it's a trouble waiting to happen.
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2023-03-26 5:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 19:45 [f2fs-dev] [PATCH 0/7] Support negative dentries on case-insensitive directories Gabriel Krisman Bertazi
2022-06-22 19:45 ` [f2fs-dev] [PATCH 1/7] fs: Expose name under lookup to d_revalidate hook Gabriel Krisman Bertazi
2023-03-23 14:33 ` Theodore Ts'o
2023-03-25 13:33 ` Theodore Ts'o
2023-03-26 5:03 ` Al Viro [this message]
2022-06-22 19:45 ` [f2fs-dev] [PATCH 2/7] fs: Add DCACHE_CASEFOLD_LOOKUP flag Gabriel Krisman Bertazi
2023-03-23 14:33 ` Theodore Ts'o
2022-06-22 19:45 ` [f2fs-dev] [PATCH 3/7] libfs: Validate negative dentries in case-insensitive directories Gabriel Krisman Bertazi
2023-03-23 14:36 ` Theodore Ts'o
2023-03-26 4:46 ` Al Viro
2023-03-31 15:31 ` Gabriel Krisman Bertazi
2022-06-22 19:46 ` [f2fs-dev] [PATCH 4/7] libfs: Support revalidation of encrypted case-insensitive dentries Gabriel Krisman Bertazi
2023-03-23 14:37 ` Theodore Ts'o
2022-06-22 19:46 ` [f2fs-dev] [PATCH 5/7] libfs: Merge encrypted_ci_dentry_ops and ci_dentry_ops Gabriel Krisman Bertazi
2023-03-23 14:39 ` Theodore Ts'o
2022-06-22 19:46 ` [f2fs-dev] [PATCH 6/7] ext4: Enable negative dentries on case-insensitive lookup Gabriel Krisman Bertazi
2022-06-23 7:29 ` kernel test robot
2022-06-23 16:36 ` Gabriel Krisman Bertazi
2023-03-23 14:39 ` Theodore Ts'o
2022-06-22 19:46 ` [f2fs-dev] [PATCH 7/7] f2fs: " Gabriel Krisman Bertazi
2022-06-23 12:44 ` kernel test robot
2023-02-24 22:36 ` [f2fs-dev] [PATCH 0/7] Support negative dentries on case-insensitive directories Daniel Rosenberg via Linux-f2fs-devel
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=20230326050349.GE3390869@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=kernel@collabora.com \
--cc=krisman@collabora.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).