Re: [RFC[RAP]] fuse: use fs-iomap for better performance so we can containerize ext4

Darrick J. Wong
2025-06-13T17:44:14Z

On Thu, Jun 12, 2025 at 07:54:12AM +0200, Miklos Szeredi wrote:
> On Wed, 11 Jun 2025 at 10:54, Amir Goldstein <amir73il@gmail.com> wrote:
>
> > There is already a mount option 'rootmode' for st_mode of root inode
> > so I suppose we could add the rootino mount option.
> >
> > Note that currently fuse_fill_super_common() instantiates the root inode
> > before negotiating FUSE_INIT with the server.
>
> I'd prefer not to add more mount options like this.
>
> It would be nice to move away from async FUSE_INIT. It's one of those
> things I wish I'd done differently.
>
> Unfortunately I don't think adding FUSE_INIT_SYNC would be sufficient,
> as servers might expect the first request to be always FUSE_INIT and
> break if it isn't. Libfuse seems to be okay, but...
>
> One idea is to add an ioctl that the server would call before
> mounting, that explicitly allows FUSE_INIT_SYNC. It's somewhat ugly,
> but I can't think of a better solution.

Hmm, well for iomap the fuse server kinda wants to know if the kernel is
going to accept iomap prior to initializing the filesystem, so it
wouldn't be that weird to have it set a "send INIT_SYNC" flag.

If one were to add an INIT_SYNC upcall, where would the callsite be?
Somewhere just prior to where we need to open the root file? And would
you want to add more fields to it? Or just use the same struct and
flags as the existing INIT call?

--D

>
> Thanks,
> Miklos
>