Skip to content

Commit 98046f7

Browse files
lostjeffleMiklos Szeredi
authored andcommitted
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. Signed-off-by: Jeffle Xu <[email protected]> Reviewed-by: Vivek Goyal <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
1 parent 780b1b9 commit 98046f7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/uapi/linux/fuse.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@
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 {
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 {
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 {
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

0 commit comments

Comments
 (0)