Pull fuse updates from Miklos Szeredi: - Support directly accessing host page cache from virtiofs. This can improve I/O performance for various workloads, as well as reducing the memory requirement by eliminating double caching. Thanks to Vivek Goyal for doing most of the work on this. - Allow automatic submounting inside virtiofs. This allows unique st_dev/ st_ino values to be assigned inside the guest to files residing on different filesystems on the host. Thanks to Max Reitz for the patches. - Fix an old use after free bug found by Pradeep P V K. * tag 'fuse-update-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: (25 commits) virtiofs: calculate number of scatter-gather elements accurately fuse: connection remove fix fuse: implement crossmounts fuse: Allow fuse_fill_super_common() for submounts fuse: split fuse_mount off of fuse_conn fuse: drop fuse_conn parameter where possible fuse: store fuse_conn in fuse_req fuse: add submount support to <uapi/linux/fuse.h> fuse: fix page dereference after free virtiofs: add logic to free up a memory range virtiofs: maintain a list of busy elements virtiofs: serialize truncate/punch_hole and dax fault path virtiofs: define dax address space operations virtiofs: add DAX mmap support virtiofs: implement dax read/write operations virtiofs: introduce setupmapping/removemapping commands virtiofs: implement FUSE_INIT map_alignment field virtiofs: keep a list of free dax memory ranges virtiofs: add a mount option to enable dax virtiofs: set up virtio_fs dax_device ...
Showing the changes to include/uapi/linux (2 of 20 files). Show all
Unified · Split
| @@ -172,6 +172,9 @@ · 171 unmodified lines | |||
| 172 | * - add FUSE_WRITE_KILL_PRIV flag | 172 | * - add FUSE_WRITE_KILL_PRIV flag |
| 173 | * - add FUSE_SETUPMAPPING and FUSE_REMOVEMAPPING | 173 | * - add FUSE_SETUPMAPPING and FUSE_REMOVEMAPPING |
| 174 | * - add map_alignment to fuse_init_out, add FUSE_MAP_ALIGNMENT flag | 174 | * - add map_alignment to fuse_init_out, add FUSE_MAP_ALIGNMENT flag |
| 175 | * | ||
| 176 | * 7.32 | ||
| 177 | * - add flags to fuse_attr, add FUSE_ATTR_SUBMOUNT, add FUSE_SUBMOUNTS | ||
| 175 | */ | 178 | */ |
| 176 | 179 | ||
| 177 | #ifndef _LINUX_FUSE_H | 180 | #ifndef _LINUX_FUSE_H |
| @@ -207,7 +210,7 @@ · 29 unmodified lines | |||
| 207 | #define FUSE_KERNEL_VERSION 7 | 210 | #define FUSE_KERNEL_VERSION 7 |
| 208 | 211 | ||
| 209 | /** Minor version number of this interface */ | 212 | /** Minor version number of this interface */ |
| 210 | #define FUSE_KERNEL_MINOR_VERSION 31 | 213 | #define FUSE_KERNEL_MINOR_VERSION 32 |
| 211 | 214 | ||
| 212 | /** The node ID of the root inode */ | 215 | /** The node ID of the root inode */ |
| 213 | #define FUSE_ROOT_ID 1 | 216 | #define FUSE_ROOT_ID 1 |
| @@ -231,7 +234,7 @@ struct fuse_attr { · 17 unmodified lines | |||
| 231 | uint32_t gid; | 234 | uint32_t gid; |
| 232 | uint32_t rdev; | 235 | uint32_t rdev; |
| 233 | uint32_t blksize; | 236 | uint32_t blksize; |
| 234 | uint32_t padding; | 237 | uint32_t flags; |
| 235 | }; | 238 | }; |
| 236 | 239 | ||
| 237 | struct fuse_kstatfs { | 240 | struct fuse_kstatfs { |
| @@ -313,7 +316,10 @@ struct fuse_file_lock { · 75 unmodified lines | |||
| 313 | * FUSE_CACHE_SYMLINKS: cache READLINK responses | 316 | * FUSE_CACHE_SYMLINKS: cache READLINK responses |
| 314 | * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir | 317 | * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir |
| 315 | * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request | 318 | * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request |
| 316 | * FUSE_MAP_ALIGNMENT: map_alignment field is valid | 319 | * FUSE_MAP_ALIGNMENT: init_out.map_alignment contains log2(byte alignment) for |
| 320 | * foffset and moffset fields in struct | ||
| 321 | * fuse_setupmapping_out and fuse_removemapping_one. | ||
| 322 | * FUSE_SUBMOUNTS: kernel supports auto-mounting directory submounts | ||
| 317 | */ | 323 | */ |
| 318 | #define FUSE_ASYNC_READ (1 << 0) | 324 | #define FUSE_ASYNC_READ (1 << 0) |
| 319 | #define FUSE_POSIX_LOCKS (1 << 1) | 325 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -342,6 +348,7 @@ struct fuse_file_lock { · 22 unmodified lines | |||
| 342 | #define FUSE_NO_OPENDIR_SUPPORT (1 << 24) | 348 | #define FUSE_NO_OPENDIR_SUPPORT (1 << 24) |
| 343 | #define FUSE_EXPLICIT_INVAL_DATA (1 << 25) | 349 | #define FUSE_EXPLICIT_INVAL_DATA (1 << 25) |
| 344 | #define FUSE_MAP_ALIGNMENT (1 << 26) | 350 | #define FUSE_MAP_ALIGNMENT (1 << 26) |
| 351 | #define FUSE_SUBMOUNTS (1 << 27) | ||
| 345 | 352 | ||
| 346 | /** | 353 | /** |
| 347 | * CUSE INIT request/reply flags | 354 | * CUSE INIT request/reply flags |
| @@ -417,6 +424,13 @@ struct fuse_file_lock { · 69 unmodified lines | |||
| 417 | */ | 424 | */ |
| 418 | #define FUSE_FSYNC_FDATASYNC (1 << 0) | 425 | #define FUSE_FSYNC_FDATASYNC (1 << 0) |
| 419 | 426 | ||
| 427 | /** | ||
| 428 | * fuse_attr flags | ||
| 429 | * | ||
| 430 | * FUSE_ATTR_SUBMOUNT: Object is a submount root | ||
| 431 | */ | ||
| 432 | #define FUSE_ATTR_SUBMOUNT (1 << 0) | ||
| 433 | |||
| 420 | enum fuse_opcode { | 434 | enum fuse_opcode { |
| 421 | FUSE_LOOKUP = 1, | 435 | FUSE_LOOKUP = 1, |
| 422 | FUSE_FORGET = 2, /* no reply */ | 436 | FUSE_FORGET = 2, /* no reply */ |
| @@ -892,4 +906,34 @@ struct fuse_copy_file_range_in { · 469 unmodified lines | |||
| 892 | uint64_t flags; | 906 | uint64_t flags; |
| 893 | }; | 907 | }; |
| 894 | 908 | ||
| 909 | #define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0) | ||
| 910 | #define FUSE_SETUPMAPPING_FLAG_READ (1ull << 1) | ||
| 911 | struct fuse_setupmapping_in { | ||
| 912 | /* An already open handle */ | ||
| 913 | uint64_t fh; | ||
| 914 | /* Offset into the file to start the mapping */ | ||
| 915 | uint64_t foffset; | ||
| 916 | /* Length of mapping required */ | ||
| 917 | uint64_t len; | ||
| 918 | /* Flags, FUSE_SETUPMAPPING_FLAG_* */ | ||
| 919 | uint64_t flags; | ||
| 920 | /* Offset in Memory Window */ | ||
| 921 | uint64_t moffset; | ||
| 922 | }; | ||
| 923 | |||
| 924 | struct fuse_removemapping_in { | ||
| 925 | /* number of fuse_removemapping_one follows */ | ||
| 926 | uint32_t count; | ||
| 927 | }; | ||
| 928 | |||
| 929 | struct fuse_removemapping_one { | ||
| 930 | /* Offset into the dax window start the unmapping */ | ||
| 931 | uint64_t moffset; | ||
| 932 | /* Length of mapping required */ | ||
| 933 | uint64_t len; | ||
| 934 | }; | ||
| 935 | |||
| 936 | #define FUSE_REMOVEMAPPING_MAX_ENTRY \ | ||
| 937 | (PAGE_SIZE / sizeof(struct fuse_removemapping_one)) | ||
| 938 | |||
| 895 | #endif /* _LINUX_FUSE_H */ | 939 | #endif /* _LINUX_FUSE_H */ |
| @@ -16,4 +16,7 @@ struct virtio_fs_config { · 15 unmodified lines | |||
| 16 | __le32 num_request_queues; | 16 | __le32 num_request_queues; |
| 17 | } __attribute__((packed)); | 17 | } __attribute__((packed)); |
| 18 | 18 | ||
| 19 | /* For the id field in virtio_pci_shm_cap */ | ||
| 20 | #define VIRTIO_FS_SHMCAP_ID_CACHE 0 | ||
| 21 | |||
| 19 | #endif /* _UAPI_LINUX_VIRTIO_FS_H */ | 22 | #endif /* _UAPI_LINUX_VIRTIO_FS_H */ |