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.
Unified · Split
| @@ -193,6 +193,7 @@ · 192 unmodified lines | ||
| 193 | 193 | * - add flags2 to fuse_init_in and fuse_init_out |
| 194 | 194 | * - add FUSE_SECURITY_CTX init flag |
| 195 | 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 | 199 | #ifndef _LINUX_FUSE_H |
| @@ -351,6 +352,7 @@ struct fuse_file_lock { · 152 unmodified lines | ||
| 351 | 352 | * FUSE_INIT_RESERVED: reserved, do not use |
| 352 | 353 | * FUSE_SECURITY_CTX: add security context to create, mkdir, symlink, and |
| 353 | 354 | * mknod |
| 355 | + * FUSE_HAS_INODE_DAX: use per inode DAX | |
| 354 | 356 | */ |
| 355 | 357 | #define FUSE_ASYNC_READ (1 << 0) |
| 356 | 358 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -386,6 +388,7 @@ struct fuse_file_lock { · 29 unmodified lines | ||
| 386 | 388 | #define FUSE_INIT_RESERVED (1 << 31) |
| 387 | 389 | /* bits 32..63 get shifted down 32 bits into the flags2 field */ |
| 388 | 390 | #define FUSE_SECURITY_CTX (1ULL << 32) |
| 391 | +#define FUSE_HAS_INODE_DAX (1ULL << 33) | |
| 389 | 392 | |
| 390 | 393 | /** |
| 391 | 394 | * CUSE INIT request/reply flags |
| @@ -468,8 +471,10 @@ struct fuse_file_lock { · 76 unmodified lines | ||
| 468 | 471 | * fuse_attr flags |
| 469 | 472 | * |
| 470 | 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 | 476 | #define FUSE_ATTR_SUBMOUNT (1 << 0) |
| 477 | +#define FUSE_ATTR_DAX (1 << 1) | |
| 473 | 478 | |
| 474 | 479 | /** |
| 475 | 480 | * Open flags |