4444 * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in
4545 * - add blksize field to fuse_attr
4646 * - add file flags field to fuse_read_in and fuse_write_in
47- * - Add ATIME_NOW and MTIME_NOW flags to fuse_setattr_in
4847 *
4948 * 7.10
5049 * - add nonseekable open flag
5554 * - add POLL message and NOTIFY_POLL notification
5655 *
5756 * 7.12
58- * - add umask flag to input argument of create , mknod and mkdir
57+ * - add umask flag to input argument of open , mknod and mkdir
5958 * - add notification messages for invalidation of inodes and
6059 * directory entries
6160 *
120119 *
121120 * 7.28
122121 * - add FUSE_COPY_FILE_RANGE
123- * - add FOPEN_CACHE_DIR
124- * - add FUSE_MAX_PAGES, add max_pages to init_out
125- * - add FUSE_CACHE_SYMLINKS
126- *
127- * 7.29
128- * - add FUSE_NO_OPENDIR_SUPPORT flag
129- *
130- * 7.30
131- * - add FUSE_EXPLICIT_INVAL_DATA
132- * - add FUSE_IOCTL_COMPAT_X32
133- *
134- * 7.31
135- * - add FUSE_WRITE_KILL_PRIV flag
136122 */
137123
138124#ifndef _LINUX_FUSE_H
168154#define FUSE_KERNEL_VERSION 7
169155
170156/** Minor version number of this interface */
171- #define FUSE_KERNEL_MINOR_VERSION 31
157+ #define FUSE_KERNEL_MINOR_VERSION 27
172158
173159/** The node ID of the root inode */
174160#define FUSE_ROOT_ID 1
@@ -236,14 +222,10 @@ struct fuse_file_lock {
236222 * FOPEN_DIRECT_IO: bypass page cache for this open file
237223 * FOPEN_KEEP_CACHE: don't invalidate the data cache on open
238224 * FOPEN_NONSEEKABLE: the file is not seekable
239- * FOPEN_CACHE_DIR: allow caching this directory
240- * FOPEN_STREAM: the file is stream-like (no file position at all)
241225 */
242226#define FOPEN_DIRECT_IO (1 << 0)
243227#define FOPEN_KEEP_CACHE (1 << 1)
244228#define FOPEN_NONSEEKABLE (1 << 2)
245- #define FOPEN_CACHE_DIR (1 << 3)
246- #define FOPEN_STREAM (1 << 4)
247229
248230/**
249231 * INIT request/reply flags
@@ -270,10 +252,6 @@ struct fuse_file_lock {
270252 * FUSE_HANDLE_KILLPRIV: fs handles killing suid/sgid/cap on write/chown/trunc
271253 * FUSE_POSIX_ACL: filesystem supports posix acls
272254 * FUSE_ABORT_ERROR: reading the device after abort returns ECONNABORTED
273- * FUSE_MAX_PAGES: init_out.max_pages contains the max number of req pages
274- * FUSE_CACHE_SYMLINKS: cache READLINK responses
275- * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir
276- * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request
277255 */
278256#define FUSE_ASYNC_READ (1 << 0)
279257#define FUSE_POSIX_LOCKS (1 << 1)
@@ -297,10 +275,6 @@ struct fuse_file_lock {
297275#define FUSE_HANDLE_KILLPRIV (1 << 19)
298276#define FUSE_POSIX_ACL (1 << 20)
299277#define FUSE_ABORT_ERROR (1 << 21)
300- #define FUSE_MAX_PAGES (1 << 22)
301- #define FUSE_CACHE_SYMLINKS (1 << 23)
302- #define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
303- #define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
304278
305279/**
306280 * CUSE INIT request/reply flags
@@ -330,11 +304,9 @@ struct fuse_file_lock {
330304 *
331305 * FUSE_WRITE_CACHE: delayed write from page cache, file handle is guessed
332306 * FUSE_WRITE_LOCKOWNER: lock_owner field is valid
333- * FUSE_WRITE_KILL_PRIV: kill suid and sgid bits
334307 */
335308#define FUSE_WRITE_CACHE (1 << 0)
336309#define FUSE_WRITE_LOCKOWNER (1 << 1)
337- #define FUSE_WRITE_KILL_PRIV (1 << 2)
338310
339311/**
340312 * Read flags
@@ -349,7 +321,6 @@ struct fuse_file_lock {
349321 * FUSE_IOCTL_RETRY: retry with new iovecs
350322 * FUSE_IOCTL_32BIT: 32bit ioctl
351323 * FUSE_IOCTL_DIR: is a directory
352- * FUSE_IOCTL_COMPAT_X32: x32 compat ioctl on 64bit machine (64bit time_t)
353324 *
354325 * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs
355326 */
@@ -358,7 +329,6 @@ struct fuse_file_lock {
358329#define FUSE_IOCTL_RETRY (1 << 2)
359330#define FUSE_IOCTL_32BIT (1 << 3)
360331#define FUSE_IOCTL_DIR (1 << 4)
361- #define FUSE_IOCTL_COMPAT_X32 (1 << 5)
362332
363333#define FUSE_IOCTL_MAX_IOV 256
364334
@@ -369,13 +339,6 @@ struct fuse_file_lock {
369339 */
370340#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
371341
372- /**
373- * Fsync flags
374- *
375- * FUSE_FSYNC_FDATASYNC: Sync data only, not metadata
376- */
377- #define FUSE_FSYNC_FDATASYNC (1 << 0)
378-
379342enum fuse_opcode {
380343 FUSE_LOOKUP = 1 ,
381344 FUSE_FORGET = 2 , /* no reply */
@@ -422,9 +385,11 @@ enum fuse_opcode {
422385 FUSE_RENAME2 = 45 ,
423386 FUSE_LSEEK = 46 ,
424387 FUSE_COPY_FILE_RANGE = 47 ,
388+ FUSE_SETUPMAPPING = 48 ,
389+ FUSE_REMOVEMAPPING = 49 ,
425390
426391 /* CUSE specific operations */
427- CUSE_INIT = 4096
392+ CUSE_INIT = 4096 ,
428393};
429394
430395enum fuse_notify_code {
@@ -434,7 +399,7 @@ enum fuse_notify_code {
434399 FUSE_NOTIFY_STORE = 4 ,
435400 FUSE_NOTIFY_RETRIEVE = 5 ,
436401 FUSE_NOTIFY_DELETE = 6 ,
437- FUSE_NOTIFY_CODE_MAX
402+ FUSE_NOTIFY_CODE_MAX ,
438403};
439404
440405/* The read buffer is required to be at least 8k, but may be much larger */
@@ -651,9 +616,7 @@ struct fuse_init_out {
651616 uint16_t congestion_threshold ;
652617 uint32_t max_write ;
653618 uint32_t time_gran ;
654- uint16_t max_pages ;
655- uint16_t padding ;
656- uint32_t unused [8 ];
619+ uint32_t unused [9 ];
657620};
658621
659622#define CUSE_INIT_INFO_MAX 4096
@@ -845,4 +808,35 @@ struct fuse_copy_file_range_in {
845808 uint64_t flags ;
846809};
847810
811+ #define FUSE_SETUPMAPPING_ENTRIES 8
812+ #define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0)
813+ struct fuse_setupmapping_in {
814+ /* An already open handle */
815+ uint64_t fh ;
816+ /* Offset into the file to start the mapping */
817+ uint64_t foffset ;
818+ /* Length of mapping required */
819+ uint64_t len ;
820+ /* Flags, FUSE_SETUPMAPPING_FLAG_* */
821+ uint64_t flags ;
822+ /* memory offset in to dax window */
823+ uint64_t moffset ;
824+ };
825+
826+ struct fuse_setupmapping_out {
827+ /* Offsets into the cache of mappings */
828+ uint64_t coffset [FUSE_SETUPMAPPING_ENTRIES ];
829+ /* Lengths of each mapping */
830+ uint64_t len [FUSE_SETUPMAPPING_ENTRIES ];
831+ };
832+
833+ struct fuse_removemapping_in {
834+ /* An already open handle */
835+ uint64_t fh ;
836+ /* Offset into the dax to start the unmapping */
837+ uint64_t moffset ;
838+ /* Length of mapping required */
839+ uint64_t len ;
840+ };
841+
848842#endif /* _LINUX_FUSE_H */
0 commit comments