History

fuse: reserve values for mapping protocol

SETUPMAPPING is a command for use with 'virtiofsd', a fuse-over-virtio implementation; it may find use in other fuse impelementations as well in which the kernel does not have access to the address space of the daemon directly. A SETUPMAPPING operation causes a section of a file to be mapped into a memory window visible to the kernel. The offsets in the file and the window are defined by the kernel performing the operation. The daemon may reject the request, for reasons including permissions and limited resources. When a request perfectly overlaps a previous mapping, the previous mapping is replaced. When a mapping partially overlaps a previous mapping, the previous mapping is split into one or two smaller mappings. REMOVEMAPPING is the complement to SETUPMAPPING; it unmaps a range of mapped files from the window visible to the kernel. The map_alignment field communicates the alignment constraint for FUSE_SETUPMAPPING/FUSE_REMOVEMAPPING and allows the daemon to constrain the addresses and file offsets chosen by the kernel.

Dr. David Alan Gilbert committed 7 years ago

Commit c4bb6671 parent 501ae8e1 file · +7 −1Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

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