All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: virtio-fs@redhat.com
Subject: Re: [Virtio-fs] [RFC] Duplicate submounts in the guest
Date: Wed, 6 May 2020 16:52:12 +0100	[thread overview]
Message-ID: <20200506155212.GN2743@work-vm> (raw)
In-Reply-To: <20200506153258.238687-1-mreitz@redhat.com>

* Max Reitz (mreitz@redhat.com) wrote:
> Hi,
> 
> This RFC consists of two patch series, one for virtiofsd (i.e., to be
> applied to the qemu repo), and one for Linux.
> 
> The problem it wants to solve is that virtiofsd just passes through the
> stat.st_ino value from the host to the guest, without taking stat.st_dev
> into account.  Therefore, it is generally impossible to uniquely
> identify nodes in the guest by their st_dev/st_ino combinations.
> 
> One way to fix this would be to derive some algorithm to derive a unique
> st_ino value from the st_dev/st_ino combination on the host, but this is
> not always possible.
> 
> So what this series does it basically passing through st_dev alongside
> st_ino: We can let the guest create auto-mounted submounts for every
> host mount point, so that they get their own dedicated st_dev.  This is
> similar to what NFS does with the crossmnt option.

Nice;  this should probably get cc'd to fuse-devel and/or put as a pull
into their github to see what they have to say.

Dave

> Announcing submounts to the guest (the FUSE client) is done by the FUSE
> server (virtiofsd) of setting st_rdev to a non-zero value (e.g. st_dev)
> for every mount point.
> 
> In this version here, duplicate mounts on the host (same st_dev) will
> not necessarily have the same st_dev in the guest.  That would be more
> complicated to implement, and there is probably no real need to.
> 
> Furthermore, note that virtiofsd identifies files based on
> st_dev/st_ino, so if you do have duplicate mounts on the guest, it is
> very much possible that you will run into problems when trying to pass
> them through to the guest (because virtiofsd may treat them as one and
> the same tree).
> 
> -- 
> 2.26.2
> 
> _______________________________________________
> Virtio-fs mailing list
> Virtio-fs@redhat.com
> https://www.redhat.com/mailman/listinfo/virtio-fs
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


  parent reply	other threads:[~2020-05-06 15:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 15:32 [Virtio-fs] [RFC] Duplicate submounts in the guest Max Reitz
2020-05-06 15:35 ` [Virtio-fs] [RFC 0/5] fuse: Auto-mounted submounts Max Reitz
2020-05-06 15:36   ` [Virtio-fs] [RFC 1/5] fuse: Store fuse_conn in fuse_req Max Reitz
2020-05-06 15:36   ` [Virtio-fs] [RFC 2/5] fuse: Drop fuse_conn parameter where possible Max Reitz
2020-05-06 15:36   ` [Virtio-fs] [RFC 3/5] fuse: Split fuse_mount off of fuse_conn Max Reitz
2020-05-07  9:56     ` Miklos Szeredi
2020-05-07 11:16       ` Max Reitz
2020-05-07 11:24         ` Miklos Szeredi
2020-05-07 12:07           ` Max Reitz
2020-05-07 14:05             ` Miklos Szeredi
2020-05-07 15:05               ` Max Reitz
2020-05-07 15:19                 ` Miklos Szeredi
2020-05-06 15:36   ` [Virtio-fs] [RFC 4/5] fuse: Allow fuse_fill_super_common() for submounts Max Reitz
2020-05-06 15:36   ` [Virtio-fs] [RFC 5/5] fuse: Implement crossmounts Max Reitz
2020-05-06 15:38 ` [Virtio-fs] [RFC 0/2] virtiofsd: Announce submounts Max Reitz
2020-05-06 15:40   ` [Virtio-fs] [RFC 1/2] virtiofsd: Store every lo_inode's parent_dev Max Reitz
2020-05-06 15:40   ` [Virtio-fs] [RFC 2/2] virtiofsd: Set st_rdev for sub-mount points Max Reitz
2020-05-06 16:04     ` Dr. David Alan Gilbert
2020-05-07 10:56       ` Max Reitz
2020-05-07 11:43         ` Miklos Szeredi
2020-05-07 12:18           ` Max Reitz
2020-05-07 13:06             ` Dr. David Alan Gilbert
2020-05-07 14:29             ` Miklos Szeredi
2020-05-07 15:15               ` Max Reitz
2020-05-07 15:23                 ` Miklos Szeredi
2020-05-06 15:52 ` Dr. David Alan Gilbert [this message]
2020-05-07 10:50   ` [Virtio-fs] [RFC] Duplicate submounts in the guest Max Reitz
2020-05-07 20:53 ` Vivek Goyal
2020-05-08  7:31   ` 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=20200506155212.GN2743@work-vm \
    --to=dgilbert@redhat.com \
    --cc=mreitz@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 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.