linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Gabriel Krisman Bertazi <krisman@suse.de>
Cc: brauner@kernel.org, tytso@mit.edu,
	linux-f2fs-devel@lists.sourceforge.net, viro@zeniv.linux.org.uk,
	linux-fsdevel@vger.kernel.org, jaegeuk@kernel.org,
	linux-ext4@vger.kernel.org,
	Gabriel Krisman Bertazi <krisman@collabora.com>
Subject: Re: [f2fs-dev] [PATCH v5 04/10] fs: Expose name under lookup to d_revalidate hooks
Date: Fri, 11 Aug 2023 19:15:50 -0700	[thread overview]
Message-ID: <20230812021550.GB971@sol.localdomain> (raw)
In-Reply-To: <20230812004146.30980-5-krisman@suse.de>

On Fri, Aug 11, 2023 at 08:41:40PM -0400, Gabriel Krisman Bertazi wrote:
> diff --git a/Documentation/filesystems/vfs.rst b/Documentation/filesystems/vfs.rst
> index cb2a97e49872..ddd542c2a722 100644
> --- a/Documentation/filesystems/vfs.rst
> +++ b/Documentation/filesystems/vfs.rst
> @@ -1251,7 +1251,8 @@ defined:
>  .. code-block:: c
>  
>  	struct dentry_operations {
> -		int (*d_revalidate)(struct dentry *, unsigned int);
> +		int (*d_revalidate)(struct dentry *, const struct qstr *,
> +				    unsigned int);
>  		int (*d_weak_revalidate)(struct dentry *, unsigned int);
>  		int (*d_hash)(const struct dentry *, struct qstr *);
>  		int (*d_compare)(const struct dentry *,
> @@ -1284,6 +1285,14 @@ defined:
>  	they can change and, in d_inode case, even become NULL under
>  	us).
>  
> +	Filesystems shouldn't rely on the name under lookup, unless
> +	there are particular filename encoding semantics to be handled
> +	during revalidation.  Note the name under lookup can change from
> +	under d_revalidate, so it must be protected with ->d_lock before
> +	accessing.  The exception is when revalidating negative dentries
> +	for creation, in which case the parent inode prevents it from
> +	changing.

Actually, the "name under lookup" can never change.  It's passed as the 'name'
argument, newly added by this patch.  What this paragraph is actually about is
the ->d_name of the dentry being revalidated.  The documentation should make it
clear when it means ->d_name and when it means name, how they differ from each
other, and what the purpose of each is.

- Eric


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2023-08-12  2:16 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-12  0:41 [f2fs-dev] [PATCH v5 00/10] Support negative dentries on case-insensitive ext4 and f2fs Gabriel Krisman Bertazi
2023-08-12  0:41 ` [f2fs-dev] [PATCH v5 01/10] fs: Expose helper to check if a directory needs casefolding Gabriel Krisman Bertazi
2023-08-12  1:59   ` Eric Biggers
2023-08-12 23:06     ` Theodore Ts'o
2023-08-13  0:12       ` Eric Biggers
2023-08-13  3:08       ` Matthew Wilcox
2023-08-13  4:30         ` Eric Biggers
2023-08-14 11:38           ` Theodore Ts'o
2023-08-14 17:22             ` Eric Biggers
2023-08-15  3:59               ` Theodore Ts'o
2023-08-14 15:02     ` Gabriel Krisman Bertazi
2023-08-14 19:14       ` Eric Biggers
2023-08-14 19:26         ` Gabriel Krisman Bertazi
2023-08-12  0:41 ` [f2fs-dev] [PATCH v5 02/10] ecryptfs: Reject casefold directory inodes Gabriel Krisman Bertazi
2023-08-12  0:41 ` [f2fs-dev] [PATCH v5 03/10] 9p: Split ->weak_revalidate from ->revalidate Gabriel Krisman Bertazi
2023-08-12  0:41 ` [f2fs-dev] [PATCH v5 04/10] fs: Expose name under lookup to d_revalidate hooks Gabriel Krisman Bertazi
2023-08-12  2:15   ` Eric Biggers [this message]
2023-08-17  7:00   ` kernel test robot
2023-08-17  9:12   ` kernel test robot
2023-08-12  0:41 ` [f2fs-dev] [PATCH v5 05/10] fs: Add DCACHE_CASEFOLDED_NAME flag Gabriel Krisman Bertazi
2023-08-12  2:17   ` Eric Biggers
2023-08-14 15:03     ` Gabriel Krisman Bertazi
2023-08-12  0:41 ` [f2fs-dev] [PATCH v5 06/10] libfs: Validate negative dentries in case-insensitive directories Gabriel Krisman Bertazi
2023-08-12  2:41   ` Eric Biggers
2023-08-14 14:50     ` Gabriel Krisman Bertazi
2023-08-14 18:42       ` Eric Biggers
2023-08-14 19:21         ` Gabriel Krisman Bertazi
2023-08-14 19:26           ` Eric Biggers
2023-08-12  0:41 ` [f2fs-dev] [PATCH v5 07/10] libfs: Chain encryption checks after case-insensitive revalidation Gabriel Krisman Bertazi
2023-08-12  0:41 ` [f2fs-dev] [PATCH v5 08/10] libfs: Merge encrypted_ci_dentry_ops and ci_dentry_ops Gabriel Krisman Bertazi
2023-08-12  0:41 ` [f2fs-dev] [PATCH v5 09/10] ext4: Enable negative dentries on case-insensitive lookup Gabriel Krisman Bertazi
2023-08-12  0:41 ` [f2fs-dev] [PATCH v5 10/10] f2fs: " Gabriel Krisman Bertazi

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=20230812021550.GB971@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=brauner@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=krisman@collabora.com \
    --cc=krisman@suse.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /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).