History

fuse: support per inode DAX in fuse protocol

Expand the fuse protocol to support per inode DAX. FUSE_HAS_INODE_DAX flag is added indicating if fuse server/client supporting per inode DAX. It can be conveyed in both FUSE_INIT request and reply. FUSE_ATTR_DAX flag is added indicating if DAX shall be enabled for corresponding file. It is conveyed in FUSE_LOOKUP reply.

Jeffle Xu committed 4 years ago

Commit 98046f71 parent 780b1b91 file · +5 −0Browse files

Unified · Split

include/uapi/linux/fuse.h+5−0
@@ -193,6 +193,7 @@ · 192 unmodified lines
193193 * - add flags2 to fuse_init_in and fuse_init_out
194194 * - add FUSE_SECURITY_CTX init flag
195195 * - add security context to create, mkdir, symlink, and mknod requests
196+ * - add FUSE_HAS_INODE_DAX, FUSE_ATTR_DAX
196197 */
197198
198199 #ifndef _LINUX_FUSE_H
@@ -351,6 +352,7 @@ struct fuse_file_lock { · 152 unmodified lines
351352 * FUSE_INIT_RESERVED: reserved, do not use
352353 * FUSE_SECURITY_CTX: add security context to create, mkdir, symlink, and
353354 * mknod
355+ * FUSE_HAS_INODE_DAX: use per inode DAX
354356 */
355357 #define FUSE_ASYNC_READ (1 << 0)
356358 #define FUSE_POSIX_LOCKS (1 << 1)
@@ -386,6 +388,7 @@ struct fuse_file_lock { · 29 unmodified lines
386388 #define FUSE_INIT_RESERVED (1 << 31)
387389 /* bits 32..63 get shifted down 32 bits into the flags2 field */
388390 #define FUSE_SECURITY_CTX (1ULL << 32)
391+#define FUSE_HAS_INODE_DAX (1ULL << 33)
389392
390393 /**
391394 * CUSE INIT request/reply flags
@@ -468,8 +471,10 @@ struct fuse_file_lock { · 76 unmodified lines
468471 * fuse_attr flags
469472 *
470473 * FUSE_ATTR_SUBMOUNT: Object is a submount root
474+ * FUSE_ATTR_DAX: Enable DAX for this file in per inode DAX mode
471475 */
472476 #define FUSE_ATTR_SUBMOUNT (1 << 0)
477+#define FUSE_ATTR_DAX (1 << 1)
473478
474479 /**
475480 * Open flags