Re: [PATCH 4/8] fuse: signal that a fuse filesystem should exhibit local fs behaviors

Darrick J. Wong
2025-09-23T20:51:44Z

On Tue, Sep 23, 2025 at 04:57:30PM +0200, Miklos Szeredi wrote:
> On Fri, 19 Sept 2025 at 19:50, Darrick J. Wong <djwong@kernel.org> wrote:
>
> > /**
> > * fuse_attr flags
> > *
> > * FUSE_ATTR_SUBMOUNT: Object is a submount root
> > * FUSE_ATTR_DAX: Enable DAX for this file in per inode DAX mode
> > * FUSE_ATTR_IOMAP: Use iomap for this inode
> > * FUSE_ATTR_ATOMIC: Enable untorn writes
> > * FUSE_ATTR_SYNC: File writes are synchronous
> > * FUSE_ATTR_IMMUTABLE: File is immutable
> > * FUSE_ATTR_APPEND: File is append-only
> > */
> >
> > So we still have plenty of space.
>
> No, I was thinking of an internal flag or flags. Exporting this to
> the server will come at some point, but not now.
>
> So for now something like
>
> /** FUSE inode state bits */
> enum {
> ...
> /* Exclusive access to file, either because fs is local or have an
> exclusive "lease" on distributed fs */
> FUSE_I_EXCLUSIVE,
> };

Oh, ok. I can do that. Just to be clear about what I need to do for
v6:

* fuse_conn::is_local goes away
* FUSE_I_* gains a new FUSE_I_EXCLUSIVE flag
* "local" operations check for FUSE_I_EXCLUSIVE instead of local_fs
* fuseblk filesystems always set FUSE_I_EXCLUSIVE
* iomap filesystems (when they arrive) always set FUSE_I_EXCLUSIVE

Right?

--D

> Thanks,
> Miklos
>