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

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/fuse.h+5−0
@@ -193,6 +193,7 @@ · 192 unmodified lines
193 * - add flags2 to fuse_init_in and fuse_init_out193 * - add flags2 to fuse_init_in and fuse_init_out
194 * - add FUSE_SECURITY_CTX init flag194 * - add FUSE_SECURITY_CTX init flag
195 * - add security context to create, mkdir, symlink, and mknod requests195 * - add security context to create, mkdir, symlink, and mknod requests
196 * - add FUSE_HAS_INODE_DAX, FUSE_ATTR_DAX
196 */197 */
197 198
198#ifndef _LINUX_FUSE_H199#ifndef _LINUX_FUSE_H
@@ -351,6 +352,7 @@ struct fuse_file_lock { · 152 unmodified lines
351 * FUSE_INIT_RESERVED: reserved, do not use352 * FUSE_INIT_RESERVED: reserved, do not use
352 * FUSE_SECURITY_CTX: add security context to create, mkdir, symlink, and353 * FUSE_SECURITY_CTX: add security context to create, mkdir, symlink, and
353 * mknod354 * mknod
355 * FUSE_HAS_INODE_DAX: use per inode DAX
354 */356 */
355#define FUSE_ASYNC_READ (1 << 0)357#define FUSE_ASYNC_READ (1 << 0)
356#define FUSE_POSIX_LOCKS (1 << 1)358#define FUSE_POSIX_LOCKS (1 << 1)
@@ -386,6 +388,7 @@ struct fuse_file_lock { · 29 unmodified lines
386#define FUSE_INIT_RESERVED (1 << 31)388#define FUSE_INIT_RESERVED (1 << 31)
387/* bits 32..63 get shifted down 32 bits into the flags2 field */389/* bits 32..63 get shifted down 32 bits into the flags2 field */
388#define FUSE_SECURITY_CTX (1ULL << 32)390#define FUSE_SECURITY_CTX (1ULL << 32)
391#define FUSE_HAS_INODE_DAX (1ULL << 33)
389 392
390/**393/**
391 * CUSE INIT request/reply flags394 * CUSE INIT request/reply flags
@@ -468,8 +471,10 @@ struct fuse_file_lock { · 76 unmodified lines
468 * fuse_attr flags471 * fuse_attr flags
469 *472 *
470 * FUSE_ATTR_SUBMOUNT: Object is a submount root473 * FUSE_ATTR_SUBMOUNT: Object is a submount root
474 * FUSE_ATTR_DAX: Enable DAX for this file in per inode DAX mode
471 */475 */
472#define FUSE_ATTR_SUBMOUNT (1 << 0)476#define FUSE_ATTR_SUBMOUNT (1 << 0)
477#define FUSE_ATTR_DAX (1 << 1)
473 478
474/**479/**
475 * Open flags480 * Open flags