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
133 *133 *
134 * 7.31134 * 7.31
135 * - add FUSE_WRITE_KILL_PRIV flag135 * - 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
136 */138 */
137 139
138#ifndef _LINUX_FUSE_H140#ifndef _LINUX_FUSE_H
@@ -274,6 +276,7 @@ struct fuse_file_lock { · 135 unmodified lines
274 * FUSE_CACHE_SYMLINKS: cache READLINK responses276 * FUSE_CACHE_SYMLINKS: cache READLINK responses
275 * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir277 * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir
276 * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request278 * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request
279 * FUSE_MAP_ALIGNMENT: map_alignment field is valid
277 */280 */
278#define FUSE_ASYNC_READ (1 << 0)281#define FUSE_ASYNC_READ (1 << 0)
279#define FUSE_POSIX_LOCKS (1 << 1)282#define FUSE_POSIX_LOCKS (1 << 1)
@@ -301,6 +304,7 @@ struct fuse_file_lock { · 21 unmodified lines
301#define FUSE_CACHE_SYMLINKS (1 << 23)304#define FUSE_CACHE_SYMLINKS (1 << 23)
302#define FUSE_NO_OPENDIR_SUPPORT (1 << 24)305#define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
303#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)306#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
307#define FUSE_MAP_ALIGNMENT (1 << 26)
304 308
305/**309/**
306 * CUSE INIT request/reply flags310 * CUSE INIT request/reply flags
@@ -422,6 +426,8 @@ enum fuse_opcode { · 115 unmodified lines
422 FUSE_RENAME2 = 45,426 FUSE_RENAME2 = 45,
423 FUSE_LSEEK = 46,427 FUSE_LSEEK = 46,
424 FUSE_COPY_FILE_RANGE = 47,428 FUSE_COPY_FILE_RANGE = 47,
429 FUSE_SETUPMAPPING = 48,
430 FUSE_REMOVEMAPPING = 49,
425 431
426 /* CUSE specific operations */432 /* CUSE specific operations */
427 CUSE_INIT = 4096,433 CUSE_INIT = 4096,
@@ -656,7 +662,7 @@ struct fuse_init_out { · 228 unmodified lines
656 uint32_t max_write;662 uint32_t max_write;
657 uint32_t time_gran;663 uint32_t time_gran;
658 uint16_t max_pages;664 uint16_t max_pages;
659 uint16_t padding;665 uint16_t map_alignment;
660 uint32_t unused[8];666 uint32_t unused[8];
661};667};
662 668
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
11struct 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
44#define VIRTIO_ID_VSOCK 19 /* virtio vsock transport */44#define VIRTIO_ID_VSOCK 19 /* virtio vsock transport */
45#define VIRTIO_ID_CRYPTO 20 /* virtio crypto */45#define VIRTIO_ID_CRYPTO 20 /* virtio crypto */
46#define VIRTIO_ID_IOMMU 23 /* virtio IOMMU */46#define VIRTIO_ID_IOMMU 23 /* virtio IOMMU */
47#define VIRTIO_ID_FS 26 /* virtio filesystem */
47#define VIRTIO_ID_PMEM 27 /* virtio pmem */48#define VIRTIO_ID_PMEM 27 /* virtio pmem */
48 49
49#endif /* _LINUX_VIRTIO_IDS_H */50#endif /* _LINUX_VIRTIO_IDS_H */