Commit Graph

231 Commits

Author SHA1 Message Date
Bernd Schubert
d372d3f80b Fixes when HAVE_LIBC_VERSIONED_SYMBOLS is not defined
fuse_loop_mt and fuse_new had not been defined when
HAVE_LIBC_VERSIONED_SYMBOLS had not been set and additionally,
fuse_new_31 was missing in the version script and was therefore
an unusable symbol.

This also adds a test for unset HAVE_LIBC_VERSIONED_SYMBOLS.
2023-01-04 15:27:21 +00:00
Bernd Schubert
d823cab63a fuse_session_loop_mt: Accept a NULL config - use defaults
If an application does not want to bother with the session
and wants to keep defaults, it can now just pass a NULL
as config parameter.
2022-09-04 13:07:15 +01:00
Bernd Schubert
30a126c5f9 API update for fuse_loop_config additions
struct fuse_loop_config was passed as a plain struct, without any
version identifer. This had two implications

1) Any addition of new parameters required a FUSE_SYMVER for
fuse_session_loop_mt() and fuse_loop_mt() as otherwise a read
beyond end-of previous struct size might have happened.

2) Filesystems also might have been recompiled and the developer
might not have noticed the struct extensions and unexpected for
the developer (or people recomliling the code) uninitialized
parameters would have been passed.


Code is updated to have struct fuse_loop_config as an opaque/private
data type for file systems that want version 312
(FUSE_MAKE_VERSION(3, 12)). The deprecated fuse_loop_config_v1
is visible, but should not be used outside of internal
conversion functions

File systems that want version >= 32 < 312 get the previous
struct (through ifdefs) and the #define of fuse_loop_mt
and fuse_session_loop_mt ensures that these recompiled file
systems call into the previous API, which then converts
the struct. This is similar to existing compiled applications
when just libfuse updated, but binaries it is solved with
the FUSE_SYMVER ABI compact declarations.

Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2022-09-04 13:07:15 +01:00
André Schröder
96ad05c8e1 patch: document ignored fill parameter of readdir 2022-04-20 11:15:08 +01:00
Amir Goldstein
dad15aee26 Add no_rofd_flush mount option
To disable flush for read-only fd.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2022-01-03 14:55:34 +02:00
Maximilian Heinzler
48ae2e72b3
Document possible NULL paths when directories are removed (#633)
When directories with open handles are removed, the releasedir and
fsyncdir operations might be called with a NULL path. That is because
there is no hiding behavior like for regular files and the nodes get
removed immediately.
2021-12-12 16:28:57 +00:00
Junichi Uekawa
8c4d315108
Fix doxygen warnings. (#600)
Some parameters were undocumented, and @file does not mean to expand current file name.
2021-05-07 10:43:30 +01:00
Andrew Gaul
da474fe7d7
Fix typos (#592) 2021-03-25 08:40:27 +00:00
ferivoz
f54eb86e9a
Fix typo "retuned" -> "returned" (#553) 2020-10-03 13:14:00 +01:00
Junichi Uekawa
e8a9e84672
Doc fixes (#537)
* Add fallocate to list of operations that may omit path.

* earlier versions is 10+ years old.

Document is not obvious how old it is. Add it.

* Update manpage link
2020-08-09 12:35:28 +01:00
Florian Weimer
a7ba1d42d0
Update comment for the copy_file_range operation (#497)
copy_file_range was first implemented with copy-based emulation in
glibc 2.27, but the emulation was subsequently removed again because
correct emulation depends on why the application attempted to make a
copy.  Therefore, file systems cannot rely on low-level userspace
performing emulation.
2020-01-31 13:38:41 -05:00
zsugabubus
38c9cb4378 Remove trailing comma in enums (#494)
They are illegal in C89/90.
2020-01-27 16:13:11 +00:00
Changli Gao
7b993f7450 Style: Fix an indention in comments (#480) 2019-12-31 10:01:26 +00:00
Bill Zissimopoulos
abdd45f83c Make ioctl prototype conditional on FUSE_USE_VERSION. (#482)
Define FUSE_USE_VERSION < 35 to get old ioctl prototype
with int commands; define FUSE_USE_VERSION >= 35 to get
new ioctl prototype with unsigned int commands.

Fixes #463.
2019-12-31 09:58:57 +00:00
Yuri Per
d735af94fa Implement lseek operation (#457) 2019-11-03 09:44:31 +00:00
Alan Somers
1a6c9811e5 Various documentation improvements
See issue #389 for some related discussions.
2019-04-06 17:37:01 +01:00
Jean-Pierre André
a1bff7dbe3 Defined the (*ioctl)() commands as unsigned int (#381)
Instead of the Posix ioctl(2) command, Linux uses its own variant of ioctl()
in which the commands are requested as "unsigned long" and truncated to
32 bits by the fuse kernel module. Transmitting the commands to user space
file systems as "unsigned int" is a workaround for processing ioctl()
commands which do not fit into a signed int.
2019-03-11 17:35:23 +00:00
Alan Somers
064fe96561 Improve documentation for the flush method (#378)
Fixes: #373
2019-03-10 19:35:30 +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
Mattias Nissler
da7c9b228a Add unprivileged option in mount.fuse3
The unprivileged option allows to run the FUSE file system process
without privileges by dropping capabilities and preventing them from
being re-acquired via setuid / fscaps etc. To accomplish this,
mount.fuse sets up the `/dev/fuse` file descriptor and mount itself
and passes the file descriptor via the `/dev/fd/%u` mountpoint syntax
to the FUSE file system.
2018-10-09 20:36:22 +01:00
Oded Arbel
8198eb4b6f return different non-zero error codes (#290)
Return different error codes from fuse_main()
2018-08-29 17:20:56 +01:00
William Woodruff
3dd29049f8 fuse.h: fix typo (currenlty -> currently) 2018-07-02 17:18:58 +01:00
Carl Edquist
cece24786e fix documentation for opendir in fuse_operations
the filehandle from opendir is passed to releasedir - there is no
closedir function in fuse_operations
2018-05-24 16:01:27 +01:00
Tomohiro Kusumi
7638bbba7b Drop redundant ; from FUSE_REGISTER_MODULE()
Callers do (and should) use ;.
2018-04-13 10:14:46 -07:00
Josh Soref
8157b4d9b9 Spelling (#223)
Fix spelling errors
2017-11-27 10:23:20 +00:00
Joseph Dodge
f12d9686d4 Add idle_threads mount option. 2017-08-24 15:17:01 +02:00
Sławek Rudnicki
89f2bae00c Allow inode cache invalidation in high-level API
We re-introduce the functionality of invalidating the caches for an
inode specified by path by adding a new routine
fuse_invalidate_path. This is useful for network-based file systems
which use the high-level API, enabling them to notify the kernel about
external changes.

This is a revival of Miklos Szeredi's original code for the
fuse_invalidate routine.
2017-08-24 14:20:37 +02:00
Nikolaus Rath
1a73904e68 Document meaning of zero telldir() offset. 2017-08-22 13:45:41 +02:00
Nikolaus Rath
ed0cfd8c7c Clarify how the filesystem should handle open/create flags 2017-08-06 10:13:43 +02:00
Nikolaus Rath
100944bd72 Only declare fuse_new_30() when FUSE_USE_VERSION == 30
This function shouldn't be called when using a newer fuse
version, so we should not define it in that case.
2017-07-13 13:27:43 +02:00
Nikolaus Rath
e870a0427a Added public fuse_lib_help(), bumped minor version 2017-07-08 12:48:08 +02:00
Nikolaus Rath
6ac254c00f Document RENAME_EXCHANGE and RENAME_NOREPLACE flags. 2017-05-25 13:12:06 -07:00
Nikolaus Rath
acd0e6469a Improved documentation of fuse_context.private_data
In particular, don't call it "user_data" in one place and
"private_data" elsewhere.

Changing the name of the variable in the prototype should not affect
backwards compatibility.

Fixes: #155.
2017-04-12 09:33:22 -07:00
Nikolaus Rath
0a096eb2bf Document true meaning of the 'use_ino' option. 2017-04-07 16:40:15 -07:00
Nikolaus Rath
56fde4ba9e Improve documentation of fuse_session_unmount 2016-11-29 08:25:52 -08:00
Nikolaus Rath
8e9cf9ecc6 Return signal value if session loop is terminated by signal and improve documentation 2016-11-29 08:25:14 -08:00
Nikolaus Rath
05de3c98c0 Add support for FUSE_HANDLE_KILLPRIV
Fixes #116.
2016-11-22 15:56:55 -08:00
Nikolaus Rath
e3958ae933 Fix typo in comment 2016-11-16 12:42:35 -08:00
Nikolaus Rath
c22da7f3a8 Add support for more detailed error codes from main loop 2016-11-16 12:41:41 -08:00
Nikolaus Rath
108c8260d3 Fix documentation: fuse_file_info may be NULL for open files
This turns issue #62 from a bug into an enhancement :-).
2016-11-06 21:47:56 -08:00
Nikolaus Rath
079b3f625e Removed reference to fgetattr and ftruncate (don't exist anymore) 2016-11-06 21:44:30 -08:00
Nikolaus Rath
7a9e0376f2 Fixed typo in comment. 2016-11-06 21:44:05 -08:00
Nikolaus Rath
7983414b33 Clean-up doxygen documentation
Fixes: #81.
2016-10-28 20:44:39 -07:00
Nikolaus Rath
97685957d7 Removed some more "Changed in version x.py" comments. 2016-10-27 20:50:16 -07:00
Nikolaus Rath
131955ff7c Recommend when to use -o default_permissions automatically 2016-10-27 13:57:19 -07:00
Nikolaus Rath
b3ab365fda fuse_session_new(): don't accept empty argv, check argv[0]
This should help avoid people to accidentally put options
into argv[0].

Fixes #100.
2016-10-24 20:31:29 -07:00
Nikolaus Rath
1d9f26f373 Turn fuse_operations.nopath_flag into fuse_config.nullpath_ok
Modifying struct fuse_config in the init() handler is the canonical way
to adjust file-system implementation specific settings. There is no need
to have flags in struct fuse_operations.
2016-10-20 15:45:32 -07:00
Nikolaus Rath
6c66dac9f2 Pass struct fuse_config to high-level init() handler. 2016-10-20 14:05:15 -07:00
Nikolaus Rath
bcb8568a46 Removed all "Introduced in..." comments
Since FUSE 3 is breaking backwards compatibility, this really does
not matter.
2016-10-20 14:04:37 -07:00
Nikolaus Rath
c8429618ad fuse_new(): instead of listing options, refer to mount.fuse(8) 2016-10-16 14:18:36 -07:00