Commit Graph

43 Commits

Author SHA1 Message Date
psycho c99f6182b4 libfuse升级
Signed-off-by: psycho <wangmingxuan6@h-partners.com>
2024-01-09 09:19:42 +08:00
zsugabubus 648d32e1d4 Remove trailing comma in enums (#494)
They are illegal in C89/90.
2020-01-27 16:13:11 +00:00
Kirill Smelkov ba5abf652c Sync fuse_kernel.h with Linux 5.2 (#433) 2019-07-09 13:54:09 -07:00
Nikolaus Rath 4ae58ffd9b Synchronize fuse_kernel.h with current kernel master. 2019-04-06 17:57:44 +01:00
Nikolaus Rath 87b907808d Delete FUSE_FSYNC_FDATASYNC
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-04-06 17:56:14 +01:00
Alan Somers 078c623703 Fix the changelog entry for protocol version 7.12 (#374)
Commit 24b35c3d97 had a simple mistake in
its changelog entry.
2019-03-09 09:50:22 +00:00
Alan Somers 1b7d2b8862 Document fuse_fsync_in.fsync_flags and remove magic numbers (#375) 2019-03-08 21:24:50 +00:00
Niels de Vos fe4f9428fc libfuse: add copy_file_range() support
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-19 12:33:56 +00:00
Niels de Vos 4c699e7deb Update kernel API headers
Taken from Linux kernel commit 3b7008b226f3.
2018-11-19 12:33:56 +00:00
Nikolaus Rath 5e35dfb5a7 Updated kernel API headers.
Taken from Linux kernel commit 27bcd37.
2016-11-22 14:58:42 -08:00
Miklos Szeredi a5a00e9b7d libfuse: add "clone_fd" option
This creates a separate device file descriptor for each processing thread,
which might improve performance.
2015-05-18 16:55:20 +02:00
Miklos Szeredi 04ad73fab6 libfuse: add FUSE_CAP_NO_OPEN_SUPPORT flag to ->init() 2015-04-23 14:13:18 +02:00
Miklos Szeredi b49cf754f9 libfuse: add flags to ->rename()
See renameat2() system call in linux-3.15 and later kernels.
2014-07-15 18:02:19 +02:00
Miklos Szeredi 978d10a42b libfuse: allow setting ctime in ->setattr() 2014-07-15 17:42:44 +02:00
Miklos Szeredi 57a93b3dac libfuse: add "time_gran" option
This allows the filesystem to specify the time granularity it
supports when the kernel is responsible for updating times
("writeback_cache" option).
2014-07-15 17:36:43 +02:00
Miklos Szeredi 8bb62a632c libfuse: Add "async_dio" and "writeback_cache" options
Asynchronous direct I/O is supported by linux kernels 3.13 and
later, writeback caching is supported by 3.14 and later.
2014-01-29 14:13:36 +01:00
Miklos Szeredi 6b02a7082a fuse: synchronize fuse_kernel.h header with the linux kernel
Check for __KERNEL__ instead of __linux__ and use the standard int
types instead of the linux specific ones.
2013-05-20 14:38:37 +02:00
Eric Wong c66e7f4e71 libfuse: allow disabling adaptive readdirplus
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-07 14:59:28 +01:00
Enke Chen 74f9acbd18 libfuse: add poll_events to fuse_file_info
Make requested poll events available to the filesystem.  If the requested
eventsare not available, then this field is zero.
2013-02-07 14:58:50 +01:00
Feng Shuo f448ac69d1 libfuse: add readdirplus support in fuse_lowlevel_ops
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-07 14:58:50 +01:00
Riku Voipio 914871b20a fuse_kernel.h: clean includes
Use <linux/types.h> for linux and define types used for other operating systems
using <stdint.h> types.
2013-02-07 12:04:21 +01:00
Feng Shuo 9ba76b9064 libfuse: Add '[no_]auto_inval_data' mount option
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-06 17:27:28 +01:00
Miklos Szeredi 06b1100aca libfuse: add missing INIT flags
Add missing flags that userspace derived from the protocol version number.  This
makes the protocol more flexible.
2013-02-06 17:20:50 +01:00
Anatol Pomozov 96ac0e5d76 Add FALLOCATE operation
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-06-18 13:32:43 +02:00
Miklos Szeredi 2ce21cd3c7 use flexible array in include/fuse_kernel.h
Use the ISO C standard compliant form instead of the gcc extension in the
interface definition.
2012-04-20 12:19:24 +02:00
Miklos Szeredi 9318a6b947 Revert "Add mmap() and munmap() methods to low level API"
This partially reverts commit 4b2157c44e.

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().
2012-01-24 14:32:28 +01:00
John Muir 5a44747054 libfuse: Notifying the kernel of deletion.
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-07 12:23:58 +01:00
Miklos Szeredi 4b2157c44e Add mmap() and munmap() methods to low level API
Currently this is only useful for CUSE.  Also update retrieve_reply()
method.
2011-12-06 18:06:18 +01:00
Miklos Szeredi e3f95263a7 Add support for ioctl on directories
Reported by Antonio SJ Musumeci
2011-12-05 15:21:28 +01:00
Miklos Szeredi 8edeaa3f29 Add ->flock() operation to low and high level interfaces
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-07-06 12:12:01 +02:00
Miklos Szeredi 49e85dee59 Fix ioctl ABI
Fix the ambiguity of ioctl ABI on the kernel/userspace boundary
for 32bit vs. 64bit userspace
2011-05-19 15:36:20 +02:00
Miklos Szeredi d915a6b4a8 Allow batching of forget requests
This allows forget requests to be processed faster and doesn't require
a modification to fuse filesystems.  Reported by Terje Malmedal
2011-05-19 15:26:37 +02:00
Miklos Szeredi 3f41e8f2c3 libfuse: add retrieve request
Retrieve data stored in the kernel buffers for a given inode.
2010-11-08 21:13:32 +01:00
Miklos Szeredi 0741f702a5 libfuse: add store request
Request data to be stored in the kernel buffers for a given inode.
2010-11-08 18:38:23 +01:00
Miklos Szeredi ed5d070739 update fuse_kernel.h 2010-06-23 08:56:01 +00:00
Miklos Szeredi 8b2a7f59b3 * Make the number of max background requests and congestion
threshold tunable.
2010-06-23 08:33:32 +00:00
Miklos Szeredi 3846394e7a * Clarify how the protocol version should be negotiated between
kernel and userspace.  Notably libfuse didn't correctly handle the
case when the supported major versions didn't match
2009-07-16 11:07:31 +00:00
Miklos Szeredi 24b35c3d97 * The context is extended with a 'umask' field. The umask is sent
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-07-02 12:26:36 +00:00
Miklos Szeredi ae9bfde712 CUSE patches from Tejun Heo 2009-06-18 11:11:54 +00:00
Miklos Szeredi 5f722fa8f6 * Implement poll support. Patch by Tejun Heo 2008-12-08 19:26:53 +00:00
Miklos Szeredi ecfa5263ab * Implement ioctl support. On high level interface only
"restricted" ioctls are supported (which are defined with the
_IO(), _IOR(), _IOW() or _IOWR() macros).  Unrestricted ioctls
will only be allwed to CUSE (Character Device in Userspace)
servers.  Patch by Tejun Heo
2008-12-05 10:55:36 +00:00
Miklos Szeredi cafdcb253e If open sets fi->nonseekable, libfuse will tell the kernel that the file is not seekable. Patch by Tejun Heo 2008-11-28 15:12:48 +00:00
Miklos Szeredi c75d6298b4 Remove fuse kernel module sources 2008-06-16 14:16:02 +00:00