From: Al Viro <viro@zeniv.linux.org.uk>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org
Subject: Re: [PATCH v3 1/5] ovl: do not open non-data lower file for fsync
Date: Mon, 7 Oct 2024 17:55:40 +0100 [thread overview]
Message-ID: <20241007165540.GN4017910@ZenIV> (raw)
In-Reply-To: <20241007141925.327055-2-amir73il@gmail.com>
On Mon, Oct 07, 2024 at 04:19:21PM +0200, Amir Goldstein wrote:
> +static int ovl_real_fdget_path(const struct file *file, struct fd *real,
> + struct path *realpath)
> - if (allow_meta) {
> - ovl_path_real(dentry, &realpath);
> - } else {
> - /* lazy lookup and verify of lowerdata */
> - err = ovl_verify_lowerdata(dentry);
This check went
> - if (err)
> - return err;
> -
> - ovl_path_realdata(dentry, &realpath);
> - }
> @@ -138,7 +129,33 @@ static int ovl_real_fdget(const struct file *file, struct fd *real)
> return 0;
> }
>
> - return ovl_real_fdget_meta(file, real, false);
> + /* lazy lookup and verify of lowerdata */
> + err = ovl_verify_lowerdata(dentry);
... here
> + if (err)
> + return err;
> +
> + ovl_path_realdata(dentry, &realpath);
> +static int ovl_upper_fdget(const struct file *file, struct fd *real, bool data)
> +{
> + struct dentry *dentry = file_dentry(file);
> + struct path realpath;
> + enum ovl_path_type type;
> +
> + if (data)
> + type = ovl_path_realdata(dentry, &realpath);
... but not here.
I can see the point of not doing that in ->fsync() after we'd already
done ovl_verify_lowerdata() at open time, but what's different about
->read_iter() and friends that also come only after ->open()?
IOW, why is fdatasync() different from other data-access cases?
next prev parent reply other threads:[~2024-10-07 16:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 14:19 [PATCH v3 0/5] Store overlay real upper file in ovl_file Amir Goldstein
2024-10-07 14:19 ` [PATCH v3 1/5] ovl: do not open non-data lower file for fsync Amir Goldstein
2024-10-07 14:39 ` Al Viro
2024-10-07 15:56 ` Amir Goldstein
2024-10-07 17:04 ` Al Viro
2024-10-07 16:55 ` Al Viro [this message]
2024-10-07 17:13 ` Al Viro
2024-10-07 14:19 ` [PATCH v3 2/5] ovl: allocate a container struct ovl_file for ovl private context Amir Goldstein
2024-10-07 14:43 ` Al Viro
2024-10-07 14:55 ` Miklos Szeredi
2024-10-07 14:19 ` [PATCH v3 3/5] ovl: store upper real file in ovl_file struct Amir Goldstein
2024-10-07 14:19 ` [PATCH v3 4/5] ovl: convert ovl_real_fdget_path() callers to ovl_real_file_path() Amir Goldstein
2024-10-07 14:19 ` [PATCH v3 5/5] ovl: convert ovl_real_fdget() callers to ovl_real_file() Amir Goldstein
2024-10-17 4:52 ` [PATCH v3 0/5] Store overlay real upper file in ovl_file Al Viro
2024-10-17 8:18 ` Amir Goldstein
2024-10-17 13:52 ` Miklos Szeredi
2024-10-17 18:13 ` Al Viro
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=20241007165540.GN4017910@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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.