From: Miklos Szeredi <miklos@szeredi.hu>
To: Horst Birthelmer <horst@birthelmer.de>
Cc: Horst Birthelmer <horst@birthelmer.com>,
Bernd Schubert <bernd@bsbernd.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Horst Birthelmer <hbirthelmer@ddn.com>
Subject: Re: Re: [PATCH] fuse: fix inode initialization race
Date: Thu, 26 Mar 2026 16:06:27 +0100 [thread overview]
Message-ID: <CAJfpegswtxB1DcTOkRs7TT=WXRGbOWSe10AvfGKfuCYQtOXjNg@mail.gmail.com> (raw)
In-Reply-To: <acVIc0fXasKIptC8@fedora>
On Thu, 26 Mar 2026 at 15:57, Horst Birthelmer <horst@birthelmer.de> wrote:
>
> On Thu, Mar 26, 2026 at 03:51:18PM +0100, Miklos Szeredi wrote:
> > On Wed, 18 Mar 2026 at 14:45, Horst Birthelmer <horst@birthelmer.com> wrote:
> > >
> > > From: Horst Birthelmer <hbirthelmer@ddn.com>
> > >
> > > Fix a race between fuse_iget() and fuse_reverse_inval_inode() where
> > > invalidation can arrive while an inode is being initialized, causing
> > > the invalidation to be lost.
> > >
> > > Add a waitqueue to make fuse_reverse_inval_inode() wait when it
> > > encounters an inode with attr_version == 0 (still initializing).
> > > When fuse_change_attributes_common() completes initialization, it
> > > wakes waiting threads.
> >
> > This should be relatively rare, right? In that case a single global
> > waitq and wake_up_all() would be better, imo.
>
> Well it depends on the use case. We send relatively many notifications
> since they are bound to the DLM system and thus to changes done by a lot
> of clients and so it happens that you get an invalidation while still
> creating the inode.
>
> What is wrong with one per connection?
It seemed to be something that would be very rarely used, hence having
a waitq_head per fc is not space efficient.
If two such events are likely to collide multiple times per second,
then I have nothing against a per-fc waitq, otherwise a global one
will be just as good.
Thanks,
Miklos
prev parent reply other threads:[~2026-03-26 15:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 13:43 [PATCH] fuse: fix inode initialization race Horst Birthelmer
2026-03-25 7:54 ` Bernd Schubert
2026-03-26 14:26 ` Christian Brauner
2026-03-26 14:51 ` Miklos Szeredi
2026-03-26 14:56 ` Horst Birthelmer
2026-03-26 15:06 ` Miklos Szeredi [this message]
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='CAJfpegswtxB1DcTOkRs7TT=WXRGbOWSe10AvfGKfuCYQtOXjNg@mail.gmail.com' \
--to=miklos@szeredi.hu \
--cc=bernd@bsbernd.com \
--cc=hbirthelmer@ddn.com \
--cc=horst@birthelmer.com \
--cc=horst@birthelmer.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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