History

Merge tag 'virtio-fs-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

Pull fuse virtio-fs support from Miklos Szeredi: "Virtio-fs allows exporting directory trees on the host and mounting them in guest(s). This isn't actually a new filesystem, but a glue layer between the fuse filesystem and a virtio based back-end. It's similar in functionality to the existing virtio-9p solution, but significantly faster in benchmarks and has better POSIX compliance. Further permformance improvements can be achieved by sharing the page cache between host and guest, allowing for faster I/O and reduced memory use. Kata Containers have been including the out-of-tree virtio-fs (with the shared page cache patches as well) since version 1.7 as an experimental feature. They have been active in development and plan to switch from virtio-9p to virtio-fs as their default solution. There has been interest from other sources as well. The userspace infrastructure is slated to be merged into qemu once the kernel part hits mainline. This was developed by Vivek Goyal, Dave Gilbert and Stefan Hajnoczi" * tag 'virtio-fs-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: virtio-fs: add virtiofs filesystem virtio-fs: add Documentation/filesystems/virtiofs.rst fuse: reserve values for mapping protocol

Linus Torvalds committed 7 years ago

Commit 8f744bd2 parents 9977b1a a62a8ef11 files · +1329 −1Browse files

Showing the changes to include/uapi/linux (3 of 11 files). Show all

Unified · Split

3 files
  1. include/uapi/linux/fuse.h +7 −1
  2. include/uapi/linux/virtio_fs.h +19 −0
  3. include/uapi/linux/virtio_ids.h +1 −0
include/uapi/linux/fuse.h+7−1
@@ -133,6 +133,8 @@ · 132 unmodified lines
133133 *
134134 * 7.31
135135 * - add FUSE_WRITE_KILL_PRIV flag
136+ * - add FUSE_SETUPMAPPING and FUSE_REMOVEMAPPING
137+ * - add map_alignment to fuse_init_out, add FUSE_MAP_ALIGNMENT flag
136138 */
137139
138140 #ifndef _LINUX_FUSE_H
@@ -274,6 +276,7 @@ struct fuse_file_lock { · 135 unmodified lines
274276 * FUSE_CACHE_SYMLINKS: cache READLINK responses
275277 * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir
276278 * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request
279+ * FUSE_MAP_ALIGNMENT: map_alignment field is valid
277280 */
278281 #define FUSE_ASYNC_READ (1 << 0)
279282 #define FUSE_POSIX_LOCKS (1 << 1)
@@ -301,6 +304,7 @@ struct fuse_file_lock { · 21 unmodified lines
301304 #define FUSE_CACHE_SYMLINKS (1 << 23)
302305 #define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
303306 #define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
307+#define FUSE_MAP_ALIGNMENT (1 << 26)
304308
305309 /**
306310 * CUSE INIT request/reply flags
@@ -422,6 +426,8 @@ enum fuse_opcode { · 115 unmodified lines
422426 FUSE_RENAME2 = 45,
423427 FUSE_LSEEK = 46,
424428 FUSE_COPY_FILE_RANGE = 47,
429+ FUSE_SETUPMAPPING = 48,
430+ FUSE_REMOVEMAPPING = 49,
425431
426432 /* CUSE specific operations */
427433 CUSE_INIT = 4096,
@@ -656,7 +662,7 @@ struct fuse_init_out { · 228 unmodified lines
656662 uint32_t max_write;
657663 uint32_t time_gran;
658664 uint16_t max_pages;
659− uint16_t padding;
665+ uint16_t map_alignment;
660666 uint32_t unused[8];
661667 };
662668
include/uapi/linux/virtio_fs.h+19−0
@@ -0,0 +1,19 @@
1+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2+
3+#ifndef _UAPI_LINUX_VIRTIO_FS_H
4+#define _UAPI_LINUX_VIRTIO_FS_H
5+
6+#include <linux/types.h>
7+#include <linux/virtio_ids.h>
8+#include <linux/virtio_config.h>
9+#include <linux/virtio_types.h>
10+
11+struct virtio_fs_config {
12+ /* Filesystem name (UTF-8, not NUL-terminated, padded with NULs) */
13+ __u8 tag[36];
14+
15+ /* Number of request queues */
16+ __u32 num_request_queues;
17+} __attribute__((packed));
18+
19+#endif /* _UAPI_LINUX_VIRTIO_FS_H */
include/uapi/linux/virtio_ids.h+1−0
@@ -44,6 +44,7 @@ · 43 unmodified lines
4444 #define VIRTIO_ID_VSOCK 19 /* virtio vsock transport */
4545 #define VIRTIO_ID_CRYPTO 20 /* virtio crypto */
4646 #define VIRTIO_ID_IOMMU 23 /* virtio IOMMU */
47+#define VIRTIO_ID_FS 26 /* virtio filesystem */
4748 #define VIRTIO_ID_PMEM 27 /* virtio pmem */
4849
4950 #endif /* _LINUX_VIRTIO_IDS_H */