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-list <virtio-fs@redhat.com>
Subject: Re: [Virtio-fs] [RFC 2/2] virtiofsd: Set st_rdev for sub-mount points
Date: Thu, 7 May 2020 14:06:32 +0100	[thread overview]
Message-ID: <20200507130632.GE2699@work-vm> (raw)
In-Reply-To: <9a601294-a470-3df9-fd8f-0eb1ed5847b6@redhat.com>

* Max Reitz (mreitz@redhat.com) wrote:
> On 07.05.20 13:43, Miklos Szeredi wrote:
> > On Thu, May 7, 2020 at 12:56 PM Max Reitz <mreitz@redhat.com> wrote:
> >>
> >> On 06.05.20 18:04, Dr. David Alan Gilbert wrote:
> >>> * Max Reitz (mreitz@redhat.com) wrote:
> >>>> Whenever we encounter a directory with an st_dev that differs from that
> >>>> of its parent, we set st_rdev accordingly so the guest can create a
> >>>> submount for it.
> >>>>
> >>>> Make this behavior optional, so submounts are only announced to the
> >>>> guest with the announce_submounts option.  Some users may prefer the
> >>>> current behavior, so that the guest learns nothing about the host mount
> >>>> structure.
> >>>>
> >>>> Signed-off-by: Max Reitz <mreitz@redhat.com>
> >>>
> >>> Does this need to be wired to a flag in the INIT message (like say
> >>> FUSE_ASYNC_READ) to indicate that the kernel/daemon supports this, or is
> >>> it really safe just to start sending the changed rdev?
> >>
> >> I supposed it to be safe, given that rdev is never used for anything but
> >> device files, so basically it was just a reserved field for directories.
> > 
> > You assume only directories can be mounted, but that's not so.  A
> > device can also be the source or destination of a bind mount.
> 
> Well, I mostly thought this case wouldn’t be too important.  But I
> suppose it doesn’t make sense to decide now that it’s never going to be
> important.

It's quite common in kata to bind mount individual /etc files - I'm not
clear if that's this particular case.

Dave

> > We need to extend fuse_entry_out with a flags field.  We could
> > possibly reuse the upper bits of entry_valid (i.e. timeouts above say
> > INT_MAX seconds could be taken as  "infinity").  Unfortunately that's
> > not as easy as splitting it into two fields due to endianness :(
> 
> For the time being, a single bit would be sufficient to signify whether
> there should be a submount at all.  We could add a field with a submount
> ID (i.e., st_dev from the host) in the future when we decide we
> want/need to ensure that two inodes with the same st_dev on the host
> also have the same st_dev in the guest.
> 
> Max
> 



--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


  reply	other threads:[~2020-05-07 13:06 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 [this message]
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 ` [Virtio-fs] [RFC] Duplicate submounts in the guest Dr. David Alan Gilbert
2020-05-07 10:50   ` 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=20200507130632.GE2699@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.