On Fri, Jul 16, 2021 at 06:47:52PM +0800, Jeffle Xu wrote: > Add one flag for fuse_attr.flags indicating if DAX shall be enabled for > this file. > > When the per-file DAX flag changes for an *opened* file, the state of > the file won't be updated until this file is closed and reopened later. > > Signed-off-by: Jeffle Xu <jefflexu@xxxxxxxxxxxxxxxxx> [..] > diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h > index 36ed092227fa..90c9df10d37a 100644 > --- a/include/uapi/linux/fuse.h > +++ b/include/uapi/linux/fuse.h > @@ -184,6 +184,9 @@ > * > * 7.34 > * - add FUSE_SYNCFS > + * > + * 7.35 > + * - add FUSE_ATTR_DAX > */ > > #ifndef _LINUX_FUSE_H > @@ -449,8 +452,10 @@ struct fuse_file_lock { > * fuse_attr flags > * > * FUSE_ATTR_SUBMOUNT: Object is a submount root > + * FUSE_ATTR_DAX: Enable DAX for this file in per-file DAX mode > */ > #define FUSE_ATTR_SUBMOUNT (1 << 0) > +#define FUSE_ATTR_DAX (1 << 1) Generic fuse changes (addition of FUSE_ATTR_DAX) should probably in a separate patch. I am not clear on one thing. If we are planning to rely on persistent inode attr (FS_XFLAG_DAX as per Documentation/filesystems/dax.rst), then why fuse server needs to communicate the state of that attr using a flag? Can client directly query it? I am not sure where at these attrs stored and if fuse protocol currently supports it. What about flag STATX_ATTR_DAX. We probably should report that too in stat if we are using dax on the inode? Vivek