@ -211,6 +211,12 @@
* 7.39
* 7.39
* - add FUSE_DIRECT_IO_ALLOW_MMAP
* - add FUSE_DIRECT_IO_ALLOW_MMAP
* - add FUSE_STATX and related structures
* - add FUSE_STATX and related structures
*
* 7.40
* - add max_stack_depth to fuse_init_out , add FUSE_PASSTHROUGH init flag
* - add backing_id to fuse_open_out , add FOPEN_PASSTHROUGH open flag
* - add FUSE_NO_EXPORT_SUPPORT init flag
* - add FUSE_NOTIFY_RESEND , add FUSE_HAS_RESEND init flag
*/
*/
# ifndef _LINUX_FUSE_H
# ifndef _LINUX_FUSE_H
@ -246,7 +252,7 @@
# define FUSE_KERNEL_VERSION 7
# define FUSE_KERNEL_VERSION 7
/** Minor version number of this interface */
/** Minor version number of this interface */
# define FUSE_KERNEL_MINOR_VERSION 39
# define FUSE_KERNEL_MINOR_VERSION 40
/** The node ID of the root inode */
/** The node ID of the root inode */
# define FUSE_ROOT_ID 1
# define FUSE_ROOT_ID 1
@ -353,6 +359,7 @@ struct fuse_file_lock {
* FOPEN_STREAM : the file is stream - like ( no file position at all )
* FOPEN_STREAM : the file is stream - like ( no file position at all )
* FOPEN_NOFLUSH : don ' t flush data cache on close ( unless FUSE_WRITEBACK_CACHE )
* FOPEN_NOFLUSH : don ' t flush data cache on close ( unless FUSE_WRITEBACK_CACHE )
* FOPEN_PARALLEL_DIRECT_WRITES : Allow concurrent direct writes on the same inode
* FOPEN_PARALLEL_DIRECT_WRITES : Allow concurrent direct writes on the same inode
* FOPEN_PASSTHROUGH : passthrough read / write io for this open file
*/
*/
# define FOPEN_DIRECT_IO (1 << 0)
# define FOPEN_DIRECT_IO (1 << 0)
# define FOPEN_KEEP_CACHE (1 << 1)
# define FOPEN_KEEP_CACHE (1 << 1)
@ -361,6 +368,7 @@ struct fuse_file_lock {
# define FOPEN_STREAM (1 << 4)
# define FOPEN_STREAM (1 << 4)
# define FOPEN_NOFLUSH (1 << 5)
# define FOPEN_NOFLUSH (1 << 5)
# define FOPEN_PARALLEL_DIRECT_WRITES (1 << 6)
# define FOPEN_PARALLEL_DIRECT_WRITES (1 << 6)
# define FOPEN_PASSTHROUGH (1 << 7)
/**
/**
* INIT request / reply flags
* INIT request / reply flags
@ -410,6 +418,9 @@ struct fuse_file_lock {
* symlink and mknod ( single group that matches parent )
* symlink and mknod ( single group that matches parent )
* FUSE_HAS_EXPIRE_ONLY : kernel supports expiry - only entry invalidation
* FUSE_HAS_EXPIRE_ONLY : kernel supports expiry - only entry invalidation
* FUSE_DIRECT_IO_ALLOW_MMAP : allow shared mmap in FOPEN_DIRECT_IO mode .
* FUSE_DIRECT_IO_ALLOW_MMAP : allow shared mmap in FOPEN_DIRECT_IO mode .
* FUSE_NO_EXPORT_SUPPORT : explicitly disable export support
* FUSE_HAS_RESEND : kernel supports resending pending requests , and the high bit
* of the request ID indicates resend requests
*/
*/
# define FUSE_ASYNC_READ (1 << 0)
# define FUSE_ASYNC_READ (1 << 0)
# define FUSE_POSIX_LOCKS (1 << 1)
# define FUSE_POSIX_LOCKS (1 << 1)
@ -449,6 +460,9 @@ struct fuse_file_lock {
# define FUSE_CREATE_SUPP_GROUP (1ULL << 34)
# define FUSE_CREATE_SUPP_GROUP (1ULL << 34)
# define FUSE_HAS_EXPIRE_ONLY (1ULL << 35)
# define FUSE_HAS_EXPIRE_ONLY (1ULL << 35)
# define FUSE_DIRECT_IO_ALLOW_MMAP (1ULL << 36)
# define FUSE_DIRECT_IO_ALLOW_MMAP (1ULL << 36)
# define FUSE_PASSTHROUGH (1ULL << 37)
# define FUSE_NO_EXPORT_SUPPORT (1ULL << 38)
# define FUSE_HAS_RESEND (1ULL << 39)
/* Obsolete alias for FUSE_DIRECT_IO_ALLOW_MMAP */
/* Obsolete alias for FUSE_DIRECT_IO_ALLOW_MMAP */
# define FUSE_DIRECT_IO_RELAX FUSE_DIRECT_IO_ALLOW_MMAP
# define FUSE_DIRECT_IO_RELAX FUSE_DIRECT_IO_ALLOW_MMAP
@ -635,6 +649,7 @@ enum fuse_notify_code {
FUSE_NOTIFY_STORE = 4 ,
FUSE_NOTIFY_STORE = 4 ,
FUSE_NOTIFY_RETRIEVE = 5 ,
FUSE_NOTIFY_RETRIEVE = 5 ,
FUSE_NOTIFY_DELETE = 6 ,
FUSE_NOTIFY_DELETE = 6 ,
FUSE_NOTIFY_RESEND = 7 ,
FUSE_NOTIFY_CODE_MAX ,
FUSE_NOTIFY_CODE_MAX ,
} ;
} ;
@ -761,7 +776,7 @@ struct fuse_create_in {
struct fuse_open_out {
struct fuse_open_out {
uint64_t fh ;
uint64_t fh ;
uint32_t open_flags ;
uint32_t open_flags ;
uint32_t padding ;
int32_t backing_id ;
} ;
} ;
struct fuse_release_in {
struct fuse_release_in {
@ -877,7 +892,8 @@ struct fuse_init_out {
uint16_t max_pages ;
uint16_t max_pages ;
uint16_t map_alignment ;
uint16_t map_alignment ;
uint32_t flags2 ;
uint32_t flags2 ;
uint32_t unused [ 7 ] ;
uint32_t max_stack_depth ;
uint32_t unused [ 6 ] ;
} ;
} ;
# define CUSE_INIT_INFO_MAX 4096
# define CUSE_INIT_INFO_MAX 4096
@ -960,6 +976,14 @@ struct fuse_fallocate_in {
uint32_t padding ;
uint32_t padding ;
} ;
} ;
/**
* FUSE request unique ID flag
*
* Indicates whether this is a resend request . The receiver should handle this
* request accordingly .
*/
# define FUSE_UNIQUE_RESEND (1ULL << 63)
struct fuse_in_header {
struct fuse_in_header {
uint32_t len ;
uint32_t len ;
uint32_t opcode ;
uint32_t opcode ;
@ -1049,9 +1073,18 @@ struct fuse_notify_retrieve_in {
uint64_t dummy4 ;
uint64_t dummy4 ;
} ;
} ;
struct fuse_backing_map {
int32_t fd ;
uint32_t flags ;
uint64_t padding ;
} ;
/* Device ioctls: */
/* Device ioctls: */
# define FUSE_DEV_IOC_MAGIC 229
# define FUSE_DEV_IOC_MAGIC 229
# define FUSE_DEV_IOC_CLONE _IOR(FUSE_DEV_IOC_MAGIC, 0, uint32_t)
# define FUSE_DEV_IOC_CLONE _IOR(FUSE_DEV_IOC_MAGIC, 0, uint32_t)
# define FUSE_DEV_IOC_BACKING_OPEN _IOW(FUSE_DEV_IOC_MAGIC, 1, \
struct fuse_backing_map )
# define FUSE_DEV_IOC_BACKING_CLOSE _IOW(FUSE_DEV_IOC_MAGIC, 2, uint32_t)
struct fuse_lseek_in {
struct fuse_lseek_in {
uint64_t fh ;
uint64_t fh ;