All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krister Johansen <kjlx@templeofstupid.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Krister Johansen <kjlx@templeofstupid.com>,
	linux-fsdevel@vger.kernel.org,
	Miklos Szeredi <mszeredi@redhat.com>,
	linux-kernel@vger.kernel.org,
	German Maglione <gmaglione@redhat.com>,
	Greg Kurz <groug@kaod.org>, Max Reitz <mreitz@redhat.com>,
	Bernd Schubert <bernd.schubert@fastmail.fm>
Subject: Re: [resend PATCH v2 2/2] fuse: ensure that submounts lookup their parent
Date: Tue, 17 Oct 2023 18:33:46 -0700	[thread overview]
Message-ID: <20231018013346.GA3902@templeofstupid.com> (raw)
In-Reply-To: <CAJfpegtzyUhcVbYrLG5Uhdur9fPxtdvxyYhFzCBf9Q8v6fK3Ow@mail.gmail.com>

Hi Miklos,

On Wed, Oct 11, 2023 at 08:27:34PM +0200, Miklos Szeredi wrote:
> On Wed, 11 Oct 2023 at 18:32, Krister Johansen <kjlx@templeofstupid.com> wrote:
> >
> > On Wed, Oct 11, 2023 at 09:07:33AM +0200, Miklos Szeredi wrote:
> > > On Wed, 11 Oct 2023 at 03:26, Krister Johansen <kjlx@templeofstupid.com> wrote:
> > >
> > > > I am curious what you have in mind in order to move this towards a
> > > > proper fix?  I shied away from the approach of stealing a nlookup from
> > > > mp_fi beacuse it wasn't clear that I could always count on the nlookup
> > > > in the parent staying positive.  E.g. I was afraid I was either going to
> > > > not have enough nlookups to move to submounts, or trigger a forget from
> > > > an exiting container that leads to an EBADF from the initial mount
> > > > namespace.
> > >
> > > One idea is to transfer the nlookup to a separately refcounted object
> > > that is referenced from mp_fi as well as all the submounts.
> >
> > That seems possible.  Would the idea be to move all tracking of nlookup
> > to a separate refcounted object for the particular nodeid, or just do
> > this for the first lookup of a submount?
> 
> Just for submounts.  And yes, it should work if the count from the
> first lookup is transferred to this object (fuse_iget()) and
> subsequent counts (fuse_dentry_revalidate()) go to the mountpoint
> inode as usual.  This will result in more than one FORGET in most
> cases, but that's okay.
> 
> > Would you like me to put together a v3 that heads this direction?
> 
> That would be great, thanks.

Thanks for the pointers here.  I started over and followed the approach
that you suggested.  It condensed to a single patch, so I'll send it as
a follow-up to this thread.

-K

  reply	other threads:[~2023-10-18  1:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 15:24 [resend PATCH v2 0/2] virtiofs submounts that are still in use forgotten by shrinker Krister Johansen
2023-10-02 15:24 ` [resend PATCH v2 1/2] fuse: revalidate: move lookup into a separate function Krister Johansen
2023-10-02 15:24 ` [resend PATCH v2 2/2] fuse: ensure that submounts lookup their parent Krister Johansen
2023-10-06 17:13   ` Bernd Schubert
2023-10-07  0:41     ` Krister Johansen
2023-10-09 12:52       ` Bernd Schubert
2023-10-09 17:15         ` Krister Johansen
2023-10-09 18:43           ` Bernd Schubert
2023-10-10  2:35             ` Krister Johansen
2023-10-09 19:45   ` Miklos Szeredi
2023-10-10  2:35     ` Krister Johansen
2023-10-10  8:15       ` Miklos Szeredi
2023-10-11  1:25         ` Krister Johansen
2023-10-11  7:07           ` Miklos Szeredi
2023-10-11 16:32             ` Krister Johansen
2023-10-11 18:27               ` Miklos Szeredi
2023-10-18  1:33                 ` Krister Johansen [this message]
2023-10-18  1:33                 ` [PATCH v3] fuse: share lookup state between submount and its parent Krister Johansen
2023-10-19 12:39                   ` Miklos Szeredi
2023-10-20 21:33                     ` Krister Johansen
2023-10-20 21:34                     ` [PATCH v4] " Krister Johansen
2023-10-02 22:18 ` [resend PATCH v2 0/2] virtiofs submounts that are still in use forgotten by shrinker Bernd Schubert
2023-10-03 16:48   ` Krister Johansen
2023-10-03 22:54     ` Bernd Schubert
2023-10-04 13:58       ` Krister Johansen

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=20231018013346.GA3902@templeofstupid.com \
    --to=kjlx@templeofstupid.com \
    --cc=bernd.schubert@fastmail.fm \
    --cc=gmaglione@redhat.com \
    --cc=groug@kaod.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mreitz@redhat.com \
    --cc=mszeredi@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 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.