linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bernd Schubert <bschubert@ddn.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Dharmendra Singh <dharamhans87@gmail.com>,
	Vivek Goyal <vgoyal@redhat.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	fuse-devel <fuse-devel@lists.sourceforge.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Horst Birthelmer <horst@birthelmer.com>
Subject: Re: [PATCH v5 0/3] FUSE: Implement atomic lookup + open/create
Date: Thu, 1 Jun 2023 12:01:25 +0000	[thread overview]
Message-ID: <805d122a-34d0-b097-c3e3-f3cc7c95aa46@ddn.com> (raw)
In-Reply-To: <CAJfpegswePPhVrDrwjZHbHb91iOkbfObnxFqzJU88U7pH86Row@mail.gmail.com>

On 6/1/23 13:50, Miklos Szeredi wrote:
> On Thu, 1 Jun 2023 at 13:17, Bernd Schubert <bschubert@ddn.com> wrote:
>>
>> Hi Miklos,
>>
>> On 5/19/22 11:39, Miklos Szeredi wrote:
>>> On Tue, 17 May 2022 at 12:08, Dharmendra Singh <dharamhans87@gmail.com> wrote:
>>>>
>>>> In FUSE, as of now, uncached lookups are expensive over the wire.
>>>> E.g additional latencies and stressing (meta data) servers from
>>>> thousands of clients. These lookup calls possibly can be avoided
>>>> in some cases. Incoming three patches address this issue.
>>>>
>>>>
>>>> Fist patch handles the case where we are creating a file with O_CREAT.
>>>> Before we go for file creation, we do a lookup on the file which is most
>>>> likely non-existent. After this lookup is done, we again go into libfuse
>>>> to create file. Such lookups where file is most likely non-existent, can
>>>> be avoided.
>>>
>>> I'd really like to see a bit wider picture...
>>>
>>> We have several cases, first of all let's look at plain O_CREAT
>>> without O_EXCL (assume that there were no changes since the last
>>> lookup for simplicity):
>>>
>>> [not cached, negative]
>>>      ->atomic_open()
>>>         LOOKUP
>>>         CREATE
>>>
>>
>> [...]
>>
>>> [not cached]
>>>      ->atomic_open()
>>>          OPEN_ATOMIC
>>
>> new patch version is eventually going through xfstests (and it finds
>> some issues), but I have a question about wording here. Why
>> "OPEN_ATOMIC" and not "ATOMIC_OPEN". Based on your comment  @Dharmendra
>> renamed all functions and this fuse op "open atomic" instead of "atomic
>> open" - for my non native English this sounds rather weird. At best it
>> should be "open atomically"?
> 
> FUSE_OPEN_ATOMIC is a specialization of FUSE_OPEN.  Does that explain
> my thinking?

Yeah, just the vfs function is also called atomic_open. We now have


static int fuse_atomic_open(struct inode *dir, struct dentry *entry,
                 struct file *file, unsigned flags,
                 umode_t mode)
{
     struct fuse_conn *fc = get_fuse_conn(dir);

     if (fc->no_open_atomic)
         return fuse_open_nonatomic(dir, entry, file, flags, mode);
     else
         return fuse_open_atomic(dir, entry, file, flags, mode);
}


Personally I would use something like _fuse_atomic_open() and 
fuse_create_open() (instead of fuse_open_nonatomic). The order of "open 
atomic" also made it into libfuse and comments - it just sounds a bit 
weird ;) I have to live with it, if you prefer it like this.


Thanks,
Bernd


  reply	other threads:[~2023-06-01 12:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 10:07 [PATCH v5 0/3] FUSE: Implement atomic lookup + open/create Dharmendra Singh
2022-05-17 10:07 ` [PATCH v5 1/3] FUSE: Avoid lookups in fuse create Dharmendra Singh
2022-05-17 21:21   ` Vivek Goyal
2022-05-18 17:41   ` Vivek Goyal
2022-05-18 17:44     ` Vivek Goyal
2022-05-18 20:28       ` Bernd Schubert
2022-05-17 10:07 ` [PATCH v5 2/3] FUSE: Rename fuse_create_open() to fuse_atomic_common() Dharmendra Singh
2022-05-17 10:07 ` [PATCH v5 3/3] FUSE: Implement atomic lookup + open Dharmendra Singh
2022-05-19  9:39 ` [PATCH v5 0/3] FUSE: Implement atomic lookup + open/create Miklos Szeredi
2022-05-19 13:13   ` Miklos Szeredi
2022-05-19 17:41   ` Bernd Schubert
2022-05-19 18:16     ` Miklos Szeredi
2022-05-19 20:47       ` [fuse-devel] " Bernd Schubert
2022-05-19 19:33   ` Vivek Goyal
2023-06-01 11:16   ` Bernd Schubert
2023-06-01 11:50     ` Miklos Szeredi
2023-06-01 12:01       ` Bernd Schubert [this message]
2023-06-01 12:18         ` Miklos Szeredi

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=805d122a-34d0-b097-c3e3-f3cc7c95aa46@ddn.com \
    --to=bschubert@ddn.com \
    --cc=dharamhans87@gmail.com \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=horst@birthelmer.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=vgoyal@redhat.com \
    /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).