virtio-fs: fuse.h cleanups
cover virtio-fs: fuse.h cleanups
These are minor fixes that should be squashed down for the virtio-fs patch series being sent upstream.
Stefan Hajnoczi (2):
fuse: drop unused struct fuse_setupmapping_out
fuse: make FUSE_REMOVEMAPPING_MAX_ENTRY private
include/uapi/linux/fuse.h | 11 ----------- fs/fuse/file.c | 3 +++ 2 files changed, 3 insertions(+), 11 deletions(-)
Signature · 1 line
2.21.0
PATCH 1/2 fuse: drop unused struct fuse_setupmapping_out
Originally the idea was that FUSE_SETUPMAPPING returns a list of addresses where the mmaps were made. But then we decided to let the FUSE client decide where to map so it already knows the address. Consequently this struct is unused.
Signed-off-by Stefan Hajnoczi <[email protected]>
--- include/uapi/linux/fuse.h | 8 -------- 1 file changed, 8 deletions(-)
include/uapi/linux/fuse.h +0 -8
@@ -824,7 +824,6 @@ struct fuse_copy_file_range_in {uint64_t flags; }; -#define FUSE_SETUPMAPPING_ENTRIES 8#define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0)#define FUSE_SETUPMAPPING_FLAG_READ (1ull << 1)struct fuse_setupmapping_in {
@@ -840,13 +839,6 @@ struct fuse_setupmapping_in {uint64_t moffset; }; -struct fuse_setupmapping_out { -/* Offsets into the cache of mappings */ -uint64_t coffset[FUSE_SETUPMAPPING_ENTRIES ]; -/* Lengths of each mapping */ -uint64_t len[FUSE_SETUPMAPPING_ENTRIES ]; -}; -struct fuse_removemapping_in {/* An already open handle */ uint64_t fh;
Signature · 1 line
2.21.0
PATCH 2/2 fuse: make FUSE_REMOVEMAPPING_MAX_ENTRY private
In reply to Stefan HajnocziFUSE_REMOVEMAPPING_MAX_ENTRY is only used by fs/fuse/file.c and is not part of the FUSE protocol. Do not expose it in the uapi header file.
Signed-off-by Stefan Hajnoczi <[email protected]>
--- include/uapi/linux/fuse.h | 3 --- fs/fuse/file.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-)
include/uapi/linux/fuse.h +0 -3
@@ -853,7 +853,4 @@ struct fuse_removemapping_one { uint64_t len; }; -#define FUSE_REMOVEMAPPING_MAX_ENTRY \ - (PAGE_SIZE / sizeof(struct fuse_removemapping_one)) -#endif /* _LINUX_FUSE_H */
fs/fuse/file.c +3 -0
@@ -22,6 +22,9 @@#include <linux/iomap.h> #include <linux/interval_tree_generic.h> +#define FUSE_REMOVEMAPPING_MAX_ENTRY \ + (PAGE_SIZE / sizeof(struct fuse_removemapping_one)) + INTERVAL_TREE_DEFINE(struct fuse_dax_mapping, rb, __u64, __subtree_last, START, LAST, static inline, fuse_dax_interval_tree);
Signature · 1 line
2.21.0