linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Max Reitz <mreitz@redhat.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	linux-fsdevel@vger.kernel.org, virtio-fs@redhat.com,
	linux-kernel@vger.kernel.org, Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [Virtio-fs] [PATCH 3/4] fuse: Call vfs_get_tree() for submounts
Date: Thu, 3 Jun 2021 09:34:17 +0200	[thread overview]
Message-ID: <20210603093333.154c23ac@bahia.lan> (raw)
In-Reply-To: <7b4a3379-3004-98f2-841c-386ce62c888a@redhat.com>

On Thu, 27 May 2021 15:24:40 +0200
Max Reitz <mreitz@redhat.com> wrote:

> On 25.05.21 17:02, Greg Kurz wrote:
> > We recently fixed an infinite loop by setting the SB_BORN flag on
> > submounts along with the write barrier needed by super_cache_count().
> > This is the job of vfs_get_tree() and FUSE shouldn't have to care
> > about the barrier at all.
> > 
> > Split out some code from fuse_dentry_automount() to a new dedicated
> > fuse_get_tree_submount() handler for submounts and call vfs_get_tree().
> > 
> > The fs_private field of the filesystem context isn't used with
> > submounts : hijack it to pass the FUSE inode of the mount point
> > down to fuse_get_tree_submount().
> 
> What exactly do you mean by “isn’t used”?  virtio_fs_init_fs_context() 
> still sets it (it is non-NULL in fuse_dentry_automount() after 
> fs_context_for_submount()).  It does appear like it is never read, but 
> one thing that definitely would need to be done is for it to be freed 
> before putting mp_fi there.
> 

Oops... yes it should. Thanks for the catch !

> So I think it may technically be fine to use this field, but then 
> virtio_fs_init_fs_context() shouldn’t set it for submounts (should be 
> discernible with fsc->purpose), and perhaps that should be a separate patch.
> 

Yes, I'll do just that.

> (Apart from that, this patch looks good to me, though.)
> 
> Max
> 
> > Finally, adapt virtiofs to use this.
> > 
> > Signed-off-by: Greg Kurz <groug@kaod.org>
> > ---
> >   fs/fuse/dir.c       | 58 +++++++--------------------------------------
> >   fs/fuse/fuse_i.h    |  6 +++++
> >   fs/fuse/inode.c     | 44 ++++++++++++++++++++++++++++++++++
> >   fs/fuse/virtio_fs.c |  3 +++
> >   4 files changed, 62 insertions(+), 49 deletions(-)
> 


  reply	other threads:[~2021-06-03  7:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 15:02 [PATCH 0/4] fuse: Some fixes for submounts Greg Kurz
2021-05-25 15:02 ` [PATCH 1/4] fuse: Fix crash in fuse_dentry_automount() error path Greg Kurz
2021-05-27  9:51   ` [Virtio-fs] " Max Reitz
2021-05-25 15:02 ` [PATCH 2/4] fuse: Fix infinite loop in sget_fc() Greg Kurz
2021-05-27 10:08   ` [Virtio-fs] " Max Reitz
2021-05-27 12:31     ` Greg Kurz
2021-05-25 15:02 ` [PATCH 3/4] fuse: Call vfs_get_tree() for submounts Greg Kurz
2021-05-27 13:24   ` [Virtio-fs] " Max Reitz
2021-06-03  7:34     ` Greg Kurz [this message]
2021-05-25 15:02 ` [PATCH 4/4] fuse: Make fuse_fill_super_submount() static Greg Kurz
2021-05-27 13:28   ` [Virtio-fs] " Max Reitz

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=20210603093333.154c23ac@bahia.lan \
    --to=groug@kaod.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mreitz@redhat.com \
    --cc=vgoyal@redhat.com \
    --cc=virtio-fs@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).