[Virtio-fs] [RFC 3/5] fuse: Split fuse_mount off of fuse_conn

Miklos Szeredi mszeredi at redhat.com
Thu May 7 15:19:11 UTC 2020


On Thu, May 7, 2020 at 5:05 PM Max Reitz <mreitz at redhat.com> wrote:
>
> On 07.05.20 16:05, Miklos Szeredi wrote:
> > On Thu, May 7, 2020 at 2:08 PM Max Reitz <mreitz at redhat.com> wrote:
> >>
> >> On 07.05.20 13:24, Miklos Szeredi wrote:
> >
> >>> Even better:  share the bdi between submounts.  This would make a lot
> >>> more sense and remove the need for loops.
> >>
> >> Hm, isn’t bdi related to the (anonymous) block device “serving” the
> >> super block, and thus the st_dev value?  (Which is necessarily different
> >> for all fuse_mounts)
> >
> > BDI is normally an object bound to a block device, but a block device
> > can have multiple partitions, each having different st_dev values.  So
> > yes, a bdi *can* be shared by multiple super blocks, and this very
> > much makes sense in the case of fuse submounts sharing a connection.
>
> OK.  Seems like all I’d need to do is let fuse_bdi_init() clone
> (bdi_get()) the existing BDI for submounts.  However, the BDI’s name (in
> sysfs) is going to be based on the root mount’s st_dev.  Is that a problem?

I don't think that's a problem.

> (Sorry if I’m asking questions whose answer seem obvious to you, but I’m
> afraid I’m rather new to everything, and it all still overwhelms me a bit.)

Don't be sorry :)

Thanks,
Miklos





More information about the Virtio-fs mailing list