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

Amir Goldstein
2025-06-11T08:54:29Z

> > > Does the nodeid for the root directory have to be FUSE_ROOT_ID?
> >
> > Yeh, I think that's the case, otherwise FUSE_INIT would need to
> > tell the kernel the root nodeid, because there is no lookup to
> > return the root nodeid.
> >
> > > I guess
> > > for ext4 that's not a big deal since ext2 inode #1 is the badblocks file
> > > which cannot be accessed from userspace anyway.
> > >
> >
> > As long as inode #1 is reserved it should be fine.
> > just need to refine the rules of the one-to-one mapping with
> > this exception.
>
> Or just make it so that passthrough_ino filesystems can specify the
> rootdir inumber?
>

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.

Thanks,
Amir.