From: Miklos Szeredi <miklos@szeredi.hu>
To: Ken Schalk <kschalk@nvidia.com>
Cc: "fuse-devel@lists.sourceforge.net"
<fuse-devel@lists.sourceforge.net>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [fuse-devel] Cross-host entry caching and file open/create
Date: Thu, 1 Oct 2020 20:25:19 +0200 [thread overview]
Message-ID: <CAJfpegv5EckmJ_PCqHc2N3_jHaXfinMwvDNSttYNXcan1wr1fQ@mail.gmail.com> (raw)
In-Reply-To: <DM6PR12MB3385C2556A59B3F33FE8B980DD520@DM6PR12MB3385.namprd12.prod.outlook.com>
On Fri, Aug 28, 2020 at 11:01 PM Ken Schalk <kschalk@nvidia.com> wrote:
>
> On Aug 26, 2020 Ken Schalk <kschalk@nvidia.com> wrote:
> > On Aug 21, 2020 Miklos Szeredi <miklos@szeredi.hu> wrote:
> > > On Thu, Aug 20, 2020 at 12:24 AM Ken Schalk <kschalk@nvidia.com> wrote:
> > > > If the open flags include O_EXCL, then we're seeing a failure
> > > > with EEXIST without any call to our FUSE filesystem's create
> > > > operation (or any other FUSE operations). The kernel makes this
> > > > failure decision based on its cached information about the
> > > > previously accessed (now deleted) file. If the open flags do
> > > > not include O_EXCL, then we're seeing a failure with ENOENT from
> > > > our open operation (because the file does not actually exist
> > > > anymore), with no call to our create operation (because the
> > > > kernel believed that the file existed, causing it to make a FUSE
> > > > open request rather than a FUSE create request).
>
> > > Does the attached patch fix it?
>
> > Thanks very much for your help. The patch you provided does solve
> > the problem in the O_CREAT|O_EXCL case (by making a lookup call to
> > re-validate the entry of the since deleted file), but not in the
> > O_CREAT case. (In that case the kernel still winds up making a FUSE
> > open request rather than a FUSE create request.) I'd like to
> > suggest the slightly different attached patch instead, which
> > triggers re-validation in both cases.
Which is a problem, because that makes O_CREAT on existing files (a
fairly common case) add a new synchronous request, possibly resulting
in a performance regression.
I don't see an easy way this can be fixed, and I'm not sure this needs
to be fixed.
Are you seeing a real issue with just O_CREAT?
Thanks,
Miklos
next prev parent reply other threads:[~2020-10-01 18:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <DM6PR12MB33857B8B2E49DF0DD0C4F950DD5D0@DM6PR12MB3385.namprd12.prod.outlook.com>
2020-08-21 15:49 ` [fuse-devel] Cross-host entry caching and file open/create Miklos Szeredi
2020-08-26 20:28 ` Ken Schalk
2020-08-28 21:01 ` Ken Schalk
2020-10-01 18:25 ` Miklos Szeredi [this message]
2020-11-23 21:07 ` Ken Schalk
2020-11-24 8:16 ` Miklos Szeredi
2020-12-18 4:39 ` Ken Schalk
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=CAJfpegv5EckmJ_PCqHc2N3_jHaXfinMwvDNSttYNXcan1wr1fQ@mail.gmail.com \
--to=miklos@szeredi.hu \
--cc=fuse-devel@lists.sourceforge.net \
--cc=kschalk@nvidia.com \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).