aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_kernel.h
AgeCommit message (Collapse)AuthorLines
2024-05-13Enable passthrough mode for read/write operations (#919)Amir Goldstein-3/+20
Add support for filesystem passthrough read/write of files. When the FUSE_PASSTHROUGH capability is enabled, the FUSE server may decide, while handling the "open" or "create" requests, if the given file can be accessed by that process in "passthrough" mode, meaning that all the further read and write operations would be forwarded by the kernel directly to the backing file rather than to the FUSE server. All requests other than read or write are still handled by the server. This allows for an improved performance on reads and writes, especially in the case of reads at random offsets, for which no (readahead) caching mechanism would help, reducing the performance gap between FUSE and native filesystem access. Extend also the passthrough_hp example with the new passthrough feature. This example opens a kernel backing file per FUSE inode on the first FUSE file open of that inode and closes the backing file on the release of the last FUSE file on that inode. All opens of the same inode passthrough to the same backing file. A combination of fi->direct_io and fi->passthrough is allowed. It means that read/write operations go directly to the server, but mmap is done on the backing file. This allows to open some fds of the inode in passthrough mode and some fd of the same inode in direct_io/passthrough_mmap mode. Signed-off-by: Alessio Balsini <balsini@android.com> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2024-01-10Add in rename to FUSE_DIRECT_IO_ALLOW_MMAPBernd Schubert-4/+6
Add in the rename of FUSE_DIRECT_IO_RELAX to FUSE_DIRECT_IO_ALLOW_MMAP.
2024-01-10Synchronize fuse_kernel.h from current linux masterBernd Schubert-1/+62
2023-04-11Update fuse_kernel.h to state of linux-6.3Bernd Schubert-13/+237
This syncs fuse_kernel.h to <linux-6.3>/include/uapi/linux/fuse.h Special handling is done for setxattr as in linux commit 52a4c95f4d24b struct fuse_setxattr_in was extended. Extended struct is only used when FUSE_SETXATTR_EXT is passed in FUSE_INIT reply.
2023-03-26Revert "upgrade of fuse_kernel.h based on Miklos expire_only kernel patch ↵Nikolaus Rath-190/+11
https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit/?h=for-next&id=53e949edb7692dce02220eba926c9d75ecbb47f7" This reverts commit 7f430a39db5a30979d75a906af891a38ebce1a3c because it breaks setxattr(). Fixes: #730
2023-03-03Enable parallel direct writes on the same file.Dharmendra singh-1/+2
Right now fuse kernel serializes direct writes on the same file. This serialization is good for such FUSE implementations which rely on the inode lock to avoid any data inconsistency issues but it hurts badly such FUSE implementations which have their own mechanism of dealing with cache/data integrity and can handle parallel direct writes on the same file. This patch allows parallel direct writes on the same file to be enabled with the help of a flag FOPEN_PARALLEL_DIRECT_WRITES. FUSE implementations which want to use this feature can set this flag during fuse init. Default behaviour remains same i.e no parallel direct writes on the same file. Corresponding fuse kernel patch(Merged). https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.2&id=153524053bbb0d27bb2e0be36d1b46862e9ce74c
2023-01-06upgrade of fuse_kernel.h based on Miklos expire_only kernel patch ↵HereThereBeDragons-11/+190
https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit/?h=for-next&id=53e949edb7692dce02220eba926c9d75ecbb47f7
2023-01-06Initial patch provided by Miklos Szeredi <mszeredi@redhat.com>HereThereBeDragons-1/+7
2022-04-17Add missing kernel flags up to 1ULL << 33Bernd Schubert-0/+8
Just a further sync with the in-kernel flags.
2022-04-08Modify structures in libfuse to handle flags beyond 32 bits.Dharmendra Singh-2/+6
In fuse kernel, 'commit 53db28933e95 ("fuse: extend init flags")' made the changes to handle flags going beyond 32 bits but i think changes were not done in libfuse to handle the same. This patch prepares the ground in libfuse for incoming FUSE kernel patches (Atomic open + lookup) where flags went beyond 32 bits. It makes struct same as in fuse kernel resulting in name change of few fields.
2022-01-03Add support for FOPEN_NOFLUSH flagAmir Goldstein-0/+2
Allow requesting from kernel to avoid flush on close at file open time. If kernel does not support FOPEN_NOFLUSH flag, the request will be ignored. For passthrough_hp example, request to avoid flush on close when writeback cache is disabled and file is opened O_RDONLY. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2020-01-27Remove trailing comma in enums (#494)zsugabubus-2/+2
They are illegal in C89/90.
2019-07-09Sync fuse_kernel.h with Linux 5.2 (#433)Kirill Smelkov-1/+24
2019-04-06Synchronize fuse_kernel.h with current kernel master.Nikolaus Rath-2/+18
2019-04-06Delete FUSE_FSYNC_FDATASYNCNikolaus Rath-7/+0
This constant is not defined in the kernel, so it will be lost when fuse_kernel.h is not synchronized. Instead, the kernel just passes a flag value of "1", so for now we also use a literal in userspace.
2019-03-09Fix the changelog entry for protocol version 7.12 (#374)Alan Somers-1/+1
Commit 24b35c3d97ffdbf0a1f8e8b4e94ed892343603a6 had a simple mistake in its changelog entry.
2019-03-08Document fuse_fsync_in.fsync_flags and remove magic numbers (#375)Alan Somers-0/+7
2018-11-19libfuse: add copy_file_range() supportNiels de Vos-45/+59
Add support for the relatively new copy_file_range() syscall. Backend filesystems can now implement an efficient way of cloning/duplicating data ranges within files. See 'man 2 copy_file_range' for more details.
2018-11-19Update kernel API headersNiels de Vos-1/+7
Taken from Linux kernel commit 3b7008b226f3.
2016-11-22Updated kernel API headers.Nikolaus Rath-1/+29
Taken from Linux kernel commit 27bcd37.
2015-05-18libfuse: add "clone_fd" optionMiklos Szeredi-0/+3
This creates a separate device file descriptor for each processing thread, which might improve performance.
2015-04-23libfuse: add FUSE_CAP_NO_OPEN_SUPPORT flag to ->init()Miklos Szeredi-0/+3
2014-07-15libfuse: add flags to ->rename()Miklos Szeredi-0/+8
See renameat2() system call in linux-3.15 and later kernels.
2014-07-15libfuse: allow setting ctime in ->setattr()Miklos Szeredi-2/+5
2014-07-15libfuse: add "time_gran" optionMiklos Szeredi-1/+8
This allows the filesystem to specify the time granularity it supports when the kernel is responsible for updating times ("writeback_cache" option).
2014-01-29libfuse: Add "async_dio" and "writeback_cache" optionsMiklos Szeredi-1/+11
Asynchronous direct I/O is supported by linux kernels 3.13 and later, writeback caching is supported by 3.14 and later.
2013-05-20fuse: synchronize fuse_kernel.h header with the linux kernelMiklos Szeredi-220/+216
Check for __KERNEL__ instead of __linux__ and use the standard int types instead of the linux specific ones.
2013-02-07libfuse: allow disabling adaptive readdirplusEric Wong-0/+3
This switches the -o no_readdirplus option to a tristate string: -o readdirplus=(yes|no|auto) Telling the kernel to always use readdirplus is beneficial to filesystems (e.g. GlusterFS) where the cost to perform readdir and readdirplus are identical. The default remains "auto" (if supported).
2013-02-07libfuse: add poll_events to fuse_file_infoEnke Chen-1/+2
Make requested poll events available to the filesystem. If the requested eventsare not available, then this field is zero.
2013-02-07libfuse: add readdirplus support in fuse_lowlevel_opsFeng Shuo-1/+16
This patch implements readdirplus support in FUSE usersapce. It adds a new fuse lowlevel operations fuse_lowleve_ops::readdir_plus, corespoding mount options and helper functions to maintain buffer. [From: Eric Wong <normalperson@yhbt.net>] This makes our terminology consistent with NFS and our kernel module, as well as reducing user/developer confusion in the command-line. Note: I'm keeping "fuse_add_direntry_plus" since that is less standardized in its use than "readdirplus" for now. Signed-off-by: Feng Shuo <steve.shuo.feng@gmail.com>
2013-02-07fuse_kernel.h: clean includesRiku Voipio-1/+5
Use <linux/types.h> for linux and define types used for other operating systems using <stdint.h> types.
2013-02-06libfuse: Add '[no_]auto_inval_data' mount optionFeng Shuo-1/+6
Several caching logic changes have been made on the kernel side to better support network-based fuse filesystems. These include kernel side mtime checking and read path cache revalidation. The new caching logic is enabled through the FUSE_AUTO_INVAL_DATA init flag. Export this to the user via the '[no_]auto_inval_data' mount option. Signed-off-by: Feng Shuo <steve.shuo.feng@gmail.com>
2013-02-06libfuse: add missing INIT flagsMiklos Szeredi-0/+12
Add missing flags that userspace derived from the protocol version number. This makes the protocol more flexible.
2012-06-18Add FALLOCATE operationAnatol Pomozov-1/+13
fallocate filesystem operation preallocates media space for the given file. If fallocate returns success then any subsequent write to the given range never fails with 'not enough space' error.
2012-04-20use flexible array in include/fuse_kernel.hMiklos Szeredi-1/+1
Use the ISO C standard compliant form instead of the gcc extension in the interface definition.
2012-01-24Revert "Add mmap() and munmap() methods to low level API"Miklos Szeredi-25/+0
This partially reverts commit 4b2157c44e6ad7e692fcffb7450143e83151d36b. Remove mmap/munmap suppor as this missed the interface changes for Linux-3.3 (API version 7.18). Only revert the mmap/munmap bits and leave the retrieve_reply API fix in place as well as the optimization in fuse_send_data_iov_fallback().
2011-12-07libfuse: Notifying the kernel of deletion.John Muir-0/+9
libfuse part to allow a FUSE file-system to tell the kernel when a file or directory is deleted. If the specified dentry has the specified inode number, the kernel will unhash it. Signed-off-by: John Muir <john@jmuir.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
2011-12-06Add mmap() and munmap() methods to low level APIMiklos Szeredi-0/+25
Currently this is only useful for CUSE. Also update retrieve_reply() method.
2011-12-05Add support for ioctl on directoriesMiklos Szeredi-1/+6
Reported by Antonio SJ Musumeci
2011-07-06Add ->flock() operation to low and high level interfacesMiklos Szeredi-1/+8
This fixes problems with emulating flock() with POSIX locking. Reported by Sebastian Pipping. As with lock/setlk/getlk most filesystems don't need to implement this, as the kernel takes care of file locking. The only reason to implement locking operations is for network filesystems which want file locking to work between clients.
2011-05-19Fix ioctl ABIMiklos Szeredi-0/+10
Fix the ambiguity of ioctl ABI on the kernel/userspace boundary for 32bit vs. 64bit userspace
2011-05-19Allow batching of forget requestsMiklos Szeredi-1/+15
This allows forget requests to be processed faster and doesn't require a modification to fuse filesystems. Reported by Terje Malmedal
2010-11-08libfuse: add retrieve requestMiklos Szeredi-0/+21
Retrieve data stored in the kernel buffers for a given inode.
2010-11-08libfuse: add store requestMiklos Szeredi-1/+12
Request data to be stored in the kernel buffers for a given inode.
2010-06-23update fuse_kernel.hMiklos Szeredi-1/+8
2010-06-23* Make the number of max background requests and congestionMiklos Szeredi-2/+4
threshold tunable.
2009-07-16* Clarify how the protocol version should be negotiated betweenMiklos Szeredi-0/+20
kernel and userspace. Notably libfuse didn't correctly handle the case when the supported major versions didn't match
2009-07-02* The context is extended with a 'umask' field. The umask is sentMiklos Szeredi-2/+35
for mknod, mkdir and create requests by linux kernel version 2.6.31 or later, otherwise the umask is set to zero. Also introduce a new feature flag: FUSE_CAP_DONT_MASK. If the kernel supports this feature, then this flag will be set in conn->capable in the ->init() method. If the filesystem sets this flag in in conn->want, then the create modes will not be masked. * Add low level interfaces for lookup cache and attribute invalidation. This feature is available in linux kernels 2.6.31 or later. Patch by John Muir * Kernel interface version is now 7.12
2009-06-18CUSE patches from Tejun HeoMiklos Szeredi-0/+31
2008-12-08* Implement poll support. Patch by Tejun HeoMiklos Szeredi-0/+31