Re: [PATCH 0/2] virtio-fs: Add 'file' mount option

From: Miklos Szeredi
Date: Thu Aug 29 2024 - 09:07:42 EST


On Thu, 29 Aug 2024 at 14:37, Hanna Czenczek <hreitz@xxxxxxxxxx> wrote:

> I honestly have no idea how to go about it on a technical level,
> though. Naïvely, I think we’d need to split off the tail of
> fuse_fill_super_common() (everything starting from the
> fuse_get_root_inode() call) into a separate function, which in case of
> virtio-fs we’d call once we get the FUSE_INIT reply. (For
> non-virtio-fs, we could just call it immediately after
> fuse_fill_super_common().)

Yes, except I'm not sure it needs to be split, that depends on whether
sending a request relies on any initialization in that function or
not.

> But we can’t return from fuse_fill_super() until that root node is set
> up, can we? If so, we‘d need to await that FUSE_INIT reply in that
> function. Can we do that?

Sure, just need to send FUSE_INIT with fuse_simple_request() instead
of fuse_simple_background().

Thanks,
Miklos