38
38
*
39
39
* Protocol changelog:
40
40
*
41
+ * 7.1:
42
+ * - add the following messages:
43
+ * FUSE_SETATTR, FUSE_SYMLINK, FUSE_MKNOD, FUSE_MKDIR, FUSE_UNLINK,
44
+ * FUSE_RMDIR, FUSE_RENAME, FUSE_LINK, FUSE_OPEN, FUSE_READ, FUSE_WRITE,
45
+ * FUSE_RELEASE, FUSE_FSYNC, FUSE_FLUSH, FUSE_SETXATTR, FUSE_GETXATTR,
46
+ * FUSE_LISTXATTR, FUSE_REMOVEXATTR, FUSE_OPENDIR, FUSE_READDIR,
47
+ * FUSE_RELEASEDIR
48
+ * - add padding to messages to accommodate 32-bit servers on 64-bit kernels
49
+ *
50
+ * 7.2:
51
+ * - add FOPEN_DIRECT_IO and FOPEN_KEEP_CACHE flags
52
+ * - add FUSE_FSYNCDIR message
53
+ *
54
+ * 7.3:
55
+ * - add FUSE_ACCESS message
56
+ * - add FUSE_CREATE message
57
+ * - add filehandle to fuse_setattr_in
58
+ *
59
+ * 7.4:
60
+ * - add frsize to fuse_kstatfs
61
+ * - clean up request size limit checking
62
+ *
63
+ * 7.5:
64
+ * - add flags and max_write to fuse_init_out
65
+ *
66
+ * 7.6:
67
+ * - add max_readahead to fuse_init_in and fuse_init_out
68
+ *
69
+ * 7.7:
70
+ * - add FUSE_INTERRUPT message
71
+ * - add POSIX file lock support
72
+ *
73
+ * 7.8:
74
+ * - add lock_owner and flags fields to fuse_release_in
75
+ * - add FUSE_BMAP message
76
+ * - add FUSE_DESTROY message
77
+ *
41
78
* 7.9:
42
79
* - new fuse_getattr_in input argument of GETATTR
43
80
* - add lk_flags in fuse_lk_in
133
170
*
134
171
* 7.31
135
172
* - add FUSE_WRITE_KILL_PRIV flag
173
+ * - add FUSE_SETUPMAPPING and FUSE_REMOVEMAPPING
174
+ * - add map_alignment to fuse_init_out, add FUSE_MAP_ALIGNMENT flag
136
175
*/
137
176
138
177
#ifndef _LINUX_FUSE_H
139
178
#define _LINUX_FUSE_H
140
179
141
- #ifdef __KERNEL__
142
- #include <linux/types.h>
143
- #else
144
180
#include <stdint.h>
145
- #endif
146
181
147
182
/*
148
183
* Version negotiation:
@@ -274,6 +309,7 @@ struct fuse_file_lock {
274
309
* FUSE_CACHE_SYMLINKS: cache READLINK responses
275
310
* FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir
276
311
* FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request
312
+ * FUSE_MAP_ALIGNMENT: map_alignment field is valid
277
313
*/
278
314
#define FUSE_ASYNC_READ (1 << 0)
279
315
#define FUSE_POSIX_LOCKS (1 << 1)
@@ -301,6 +337,7 @@ struct fuse_file_lock {
301
337
#define FUSE_CACHE_SYMLINKS (1 << 23)
302
338
#define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
303
339
#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
340
+ #define FUSE_MAP_ALIGNMENT (1 << 26)
304
341
305
342
/**
306
343
* CUSE INIT request/reply flags
@@ -422,9 +459,15 @@ enum fuse_opcode {
422
459
FUSE_RENAME2 = 45 ,
423
460
FUSE_LSEEK = 46 ,
424
461
FUSE_COPY_FILE_RANGE = 47 ,
462
+ FUSE_SETUPMAPPING = 48 ,
463
+ FUSE_REMOVEMAPPING = 49 ,
425
464
426
465
/* CUSE specific operations */
427
- CUSE_INIT = 4096
466
+ CUSE_INIT = 4096 ,
467
+
468
+ /* Reserved opcodes: helpful to detect structure endian-ness */
469
+ CUSE_INIT_BSWAP_RESERVED = 1048576 , /* CUSE_INIT << 8 */
470
+ FUSE_INIT_BSWAP_RESERVED = 436207616 , /* FUSE_INIT << 24 */
428
471
};
429
472
430
473
enum fuse_notify_code {
@@ -434,7 +477,7 @@ enum fuse_notify_code {
434
477
FUSE_NOTIFY_STORE = 4 ,
435
478
FUSE_NOTIFY_RETRIEVE = 5 ,
436
479
FUSE_NOTIFY_DELETE = 6 ,
437
- FUSE_NOTIFY_CODE_MAX
480
+ FUSE_NOTIFY_CODE_MAX ,
438
481
};
439
482
440
483
/* The read buffer is required to be at least 8k, but may be much larger */
@@ -453,6 +496,11 @@ struct fuse_entry_out {
453
496
struct fuse_attr attr ;
454
497
};
455
498
499
+ struct fuse_entryver_out {
500
+ uint64_t version_index ;
501
+ int64_t initial_version ;
502
+ };
503
+
456
504
struct fuse_forget_in {
457
505
uint64_t nlookup ;
458
506
};
@@ -652,7 +700,7 @@ struct fuse_init_out {
652
700
uint32_t max_write ;
653
701
uint32_t time_gran ;
654
702
uint16_t max_pages ;
655
- uint16_t padding ;
703
+ uint16_t map_alignment ;
656
704
uint32_t unused [8 ];
657
705
};
658
706
@@ -845,4 +893,30 @@ struct fuse_copy_file_range_in {
845
893
uint64_t flags ;
846
894
};
847
895
896
+ #define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0)
897
+ struct fuse_setupmapping_in {
898
+ /* An already open handle */
899
+ uint64_t fh ;
900
+ /* Offset into the file to start the mapping */
901
+ uint64_t foffset ;
902
+ /* Length of mapping required */
903
+ uint64_t len ;
904
+ /* Flags, FUSE_SETUPMAPPING_FLAG_* */
905
+ uint64_t flags ;
906
+ /* memory offset in to dax window */
907
+ uint64_t moffset ;
908
+ };
909
+
910
+ struct fuse_removemapping_in {
911
+ /* number of fuse_removemapping_one follows */
912
+ uint32_t count ;
913
+ };
914
+
915
+ struct fuse_removemapping_one {
916
+ /* Offset into the dax to start the unmapping */
917
+ uint64_t moffset ;
918
+ /* Length of mapping required */
919
+ uint64_t len ;
920
+ };
921
+
848
922
#endif /* _LINUX_FUSE_H */
0 commit comments