From: Bernd Schubert <bernd.schubert@fastmail.fm>
To: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>,
mszeredi@redhat.com
Cc: "Al Viro" <viro@zeniv.linux.org.uk>,
"Amir Goldstein" <amir73il@gmail.com>,
"Stéphane Graber" <stgraber@ubuntu.com>,
"Seth Forshee" <sforshee@kernel.org>,
"Christian Brauner" <brauner@kernel.org>,
"Andrei Vagin" <avagin@gmail.com>,
"Pavel Tikhomirov" <ptikhomirov@virtuozzo.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
criu@openvz.org
Subject: Re: [RFC PATCH 4/9] fuse: handle stale inode connection in fuse_queue_forget
Date: Fri, 3 Mar 2023 19:47:26 +0100 [thread overview]
Message-ID: <e78a7256-8508-bd7f-d62f-16f5a1837681@fastmail.fm> (raw)
In-Reply-To: <20230220193754.470330-5-aleksandr.mikhalitsyn@canonical.com>
On 2/20/23 20:37, Alexander Mikhalitsyn wrote:
> We don't want to send FUSE_FORGET request to the new
> fuse daemon if inode was lookuped by the old fuse daemon
> because it can confuse and break userspace (libfuse).
>
> For now, just add a new argument to fuse_queue_forget and
> handle it. Adjust all callers to match the old behaviour.
>
> Cc: Miklos Szeredi <mszeredi@redhat.com>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: Amir Goldstein <amir73il@gmail.com>
> Cc: Stéphane Graber <stgraber@ubuntu.com>
> Cc: Seth Forshee <sforshee@kernel.org>
> Cc: Christian Brauner <brauner@kernel.org>
> Cc: Andrei Vagin <avagin@gmail.com>
> Cc: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
> Cc: linux-fsdevel@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: criu@openvz.org
> Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
> ---
> fs/fuse/dev.c | 4 ++--
> fs/fuse/dir.c | 8 ++++----
> fs/fuse/fuse_i.h | 2 +-
> fs/fuse/inode.c | 2 +-
> 4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
> index eb4f88e3dc97..85f69629f34d 100644
> --- a/fs/fuse/dev.c
> +++ b/fs/fuse/dev.c
> @@ -234,7 +234,7 @@ __releases(fiq->lock)
> }
>
> void fuse_queue_forget(struct fuse_conn *fc, struct fuse_forget_link *forget,
> - u64 nodeid, u64 nlookup)
> + u64 nodeid, u64 nlookup, bool stale_inode_conn)
> {
> struct fuse_iqueue *fiq = &fc->iq;
>
> @@ -242,7 +242,7 @@ void fuse_queue_forget(struct fuse_conn *fc, struct fuse_forget_link *forget,
> forget->forget_one.nlookup = nlookup;
>
> spin_lock(&fiq->lock);
> - if (fiq->connected) {
> + if (fiq->connected && !stale_inode_conn) {
> fiq->forget_list_tail->next = forget;
> fiq->forget_list_tail = forget;
> fiq->ops->wake_forget_and_unlock(fiq);
I'm not sure about kernel coding rules here - for me that is unlikely
rare event - I would have added unlikely() here.
next prev parent reply other threads:[~2023-03-03 18:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 19:37 [RFC PATCH 0/9] fuse: API for Checkpoint/Restore Alexander Mikhalitsyn
2023-02-20 19:37 ` [RFC PATCH 1/9] fuse: move FUSE_DEFAULT_* defines to fuse common header Alexander Mikhalitsyn
2023-02-20 19:37 ` [RFC PATCH 2/9] fuse: add const qualifiers to common fuse helpers Alexander Mikhalitsyn
2023-02-20 19:37 ` [RFC PATCH 3/9] fuse: add fuse connection generation Alexander Mikhalitsyn
2023-02-20 19:37 ` [RFC PATCH 4/9] fuse: handle stale inode connection in fuse_queue_forget Alexander Mikhalitsyn
2023-03-03 18:47 ` Bernd Schubert [this message]
2023-02-20 19:37 ` [RFC PATCH 5/9] fuse: move fuse connection flags to the separate structure Alexander Mikhalitsyn
2023-03-03 18:26 ` Bernd Schubert
2023-02-20 19:37 ` [RFC PATCH 6/9] fuse: take fuse connection generation into account Alexander Mikhalitsyn
2023-03-03 18:45 ` Bernd Schubert
2023-02-20 19:37 ` [RFC PATCH 7/9] fuse: add fuse device ioctl(FUSE_DEV_IOC_REINIT) Alexander Mikhalitsyn
2023-03-03 19:19 ` Bernd Schubert
2023-04-03 14:56 ` Aleksandr Mikhalitsyn
2023-03-03 19:26 ` Bernd Schubert
2023-03-06 14:09 ` Aleksandr Mikhalitsyn
2023-04-03 14:51 ` Aleksandr Mikhalitsyn
2023-04-11 22:18 ` Bernd Schubert
2023-02-20 19:37 ` [RFC PATCH 8/9] namespace: add sb_revalidate_bindmounts helper Alexander Mikhalitsyn
2023-02-20 19:37 ` [RFC PATCH 9/9] fuse: add fuse device ioctl(FUSE_DEV_IOC_BM_REVAL) Alexander Mikhalitsyn
2023-03-03 19:42 ` [RFC PATCH 0/9] fuse: API for Checkpoint/Restore Bernd Schubert
2023-03-06 14:06 ` Aleksandr Mikhalitsyn
2023-03-06 16:14 ` Miklos Szeredi
2023-03-06 16:44 ` Aleksandr Mikhalitsyn
2023-03-06 19:18 ` Miklos Szeredi
2023-03-06 21:05 ` Bernd Schubert
2023-03-06 22:16 ` Aleksandr Mikhalitsyn
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=e78a7256-8508-bd7f-d62f-16f5a1837681@fastmail.fm \
--to=bernd.schubert@fastmail.fm \
--cc=aleksandr.mikhalitsyn@canonical.com \
--cc=amir73il@gmail.com \
--cc=avagin@gmail.com \
--cc=brauner@kernel.org \
--cc=criu@openvz.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mszeredi@redhat.com \
--cc=ptikhomirov@virtuozzo.com \
--cc=sforshee@kernel.org \
--cc=stgraber@ubuntu.com \
--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).