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.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -193,6 +193,7 @@ · 192 unmodified lines | |||
| 193 | * - add flags2 to fuse_init_in and fuse_init_out | 193 | * - add flags2 to fuse_init_in and fuse_init_out |
| 194 | * - add FUSE_SECURITY_CTX init flag | 194 | * - add FUSE_SECURITY_CTX init flag |
| 195 | * - add security context to create, mkdir, symlink, and mknod requests | 195 | * - 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_H | 199 | #ifndef _LINUX_FUSE_H |
| @@ -351,6 +352,7 @@ struct fuse_file_lock { · 152 unmodified lines | |||
| 351 | * FUSE_INIT_RESERVED: reserved, do not use | 352 | * FUSE_INIT_RESERVED: reserved, do not use |
| 352 | * FUSE_SECURITY_CTX: add security context to create, mkdir, symlink, and | 353 | * FUSE_SECURITY_CTX: add security context to create, mkdir, symlink, and |
| 353 | * mknod | 354 | * 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 flags | 394 | * CUSE INIT request/reply flags |
| @@ -468,8 +471,10 @@ struct fuse_file_lock { · 76 unmodified lines | |||
| 468 | * fuse_attr flags | 471 | * fuse_attr flags |
| 469 | * | 472 | * |
| 470 | * FUSE_ATTR_SUBMOUNT: Object is a submount root | 473 | * 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 flags | 480 | * Open flags |