aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse.h
AgeCommit message (Collapse)AuthorLines
2024-07-03Annotate ABI sensitivness for some data structuresBernd Schubert-1/+5
These are not all ABI sensitive data structures yet. Also some space vs tab indentation issues are corrected.
2024-07-03high-level: add fmask and dmask optionsgandalfs_cat-0/+8
dmask: umask applied to directories fmask: umask applied to non-directories to get "typical" permission bits for regular files (0644) and directories (0755), a single umask option is not sufficient (or well, it isn't the way fuse implements it) there is precident for separate umask and dmask options in other filesystems (see for example fat: https://github.com/torvalds/linux/tree/master/fs/fat) this addition should not affect backward-compatibility; the original umask option retains the same meaning, but non-zero fmask or dmask will override it.
2024-05-13Add in the libfuse version a program was compiled with (#942)Bernd Schubert-23/+85
The API stays the same, the libfuse version comes from inlined functions, which are defined fuse_lowlevel.h and fuse.h. As these inlined functions are defined in the header files they get added into the application, similar as if these were preprocessor macros. Macro vs inlined function is then just a style issue - I personally prefer the latter. fuse_session_new() -> static inlinei, in the application _fuse_session_new -> inside of libfuse fuse_new() -> static inline, in the application _fuse_new() -> inside of libfuse Note: Entirely untested is the fuse 30 api - we need a test for it. And we do not have any ABI tests at all. Signed-off-by: Bernd Schubert <bernd.schubert@fastmail.fm>
2024-03-20Add FUSE_FILL_DIR_DEFAULTS enum (#903)FredyVia-0/+2
In order to use the fuse_fill_dir_t function in a C++ program, add the enum item: FUSE_FILL_DIR_DEFAULTS Without this change g++ compilation failed with example/hello.c:94:35: error: invalid conversion from ‘int’ to ‘fuse_fill_dir_flags’ [-fpermissive] 94 | filler(buf, ".", NULL, 0, 0); | ^ | | | int
2023-10-09Fixes typo in fuse.h (#844)Nikola Petrov-1/+1
2023-04-11Fix doxygen warning about parameter nameMatthias Goergens-1/+1
Before: ``` $ doxygen doc/Doxyfile /Users/matthias/prog/fuser/libfuse/include/fuse.h:934: warning: argument 'private_data' of command @param is not found in the argument list of fuse_new_31(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data) /Users/matthias/prog/fuser/libfuse/include/fuse.h:934: warning: The following parameter of fuse_new_31(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data) is not documented: parameter 'user_data' ```
2023-03-03Enable parallel direct writes on the same file.Dharmendra singh-0/+14
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-02-09Split config.h into private and public configBernd Schubert-5/+5
This addresses https://github.com/libfuse/libfuse/issues/729 commit db35a37def14b72181f3630efeea0e0433103c41 introduced a public config.h (rename to fuse_config.h to avoid conflicts) that was installed with the package and included by libfuse users through fuse_common.h. Probablem is that this file does not have unique defines so that they are unique to libfuse - on including the file conflicts with libfuse users came up. In principle all defines could be prefixed, but then most of them are internal for libfuse compilation only. So this splits out publically required defines to a new file 'libfuse_config.h' and changes back to include of "fuse_config.h" only when HAVE_LIBFUSE_PRIVATE_CONFIG_H is defined. This also renames HAVE_LIBC_VERSIONED_SYMBOLS to LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS, as it actually better explains for libfuse users what that variable is for.
2023-01-04Fixes when HAVE_LIBC_VERSIONED_SYMBOLS is not definedBernd Schubert-0/+12
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.
2022-09-04fuse_session_loop_mt: Accept a NULL config - use defaultsBernd Schubert-1/+1
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-04API update for fuse_loop_config additionsBernd Schubert-0/+3
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-04-20patch: document ignored fill parameter of readdirAndré Schröder-0/+7
2022-01-03Add no_rofd_flush mount optionAmir Goldstein-0/+8
To disable flush for read-only fd. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2021-12-12Document possible NULL paths when directories are removed (#633)Maximilian Heinzler-0/+6
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-05-07Fix doxygen warnings. (#600)Junichi Uekawa-9/+12
Some parameters were undocumented, and @file does not mean to expand current file name.
2021-03-25Fix typos (#592)Andrew Gaul-5/+5
2020-10-03Fix typo "retuned" -> "returned" (#553)ferivoz-1/+1
2020-08-09Doc fixes (#537)Junichi Uekawa-2/+2
* 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-01-31Update comment for the copy_file_range operation (#497)Florian Weimer-3/+4
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-27Remove trailing comma in enums (#494)zsugabubus-2/+2
They are illegal in C89/90.
2019-12-31Style: Fix an indention in comments (#480)Changli Gao-2/+2
2019-12-31Make ioctl prototype conditional on FUSE_USE_VERSION. (#482)Bill Zissimopoulos-0/+11
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-11-03Implement lseek operation (#457)Yuri Per-0/+7
2019-04-06Various documentation improvementsAlan Somers-13/+12
See issue #389 for some related discussions.
2019-03-11Defined the (*ioctl)() commands as unsigned int (#381)Jean-Pierre André-3/+7
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-10Improve documentation for the flush method (#378)Alan Somers-13/+20
Fixes: #373
2018-11-19libfuse: add copy_file_range() supportNiels de Vos-0/+22
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-10-09Add unprivileged option in `mount.fuse3`Mattias Nissler-0/+10
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-08-29return different non-zero error codes (#290)Oded Arbel-0/+9
Return different error codes from fuse_main()
2018-07-02fuse.h: fix typo (currenlty -> currently)William Woodruff-1/+1
2018-05-24fix documentation for opendir in fuse_operationsCarl Edquist-1/+1
the filehandle from opendir is passed to releasedir - there is no closedir function in fuse_operations
2018-04-13Drop redundant ; from FUSE_REGISTER_MODULE()Tomohiro Kusumi-1/+1
Callers do (and should) use ;.
2017-11-27Spelling (#223)Josh Soref-8/+8
Fix spelling errors
2017-08-24Add idle_threads mount option.Joseph Dodge-3/+7
2017-08-24Allow inode cache invalidation in high-level APISławek Rudnicki-0/+13
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-22Document meaning of zero telldir() offset.Nikolaus Rath-0/+6
2017-08-06Clarify how the filesystem should handle open/create flagsNikolaus Rath-13/+46
2017-07-13Only declare fuse_new_30() when FUSE_USE_VERSION == 30Nikolaus Rath-2/+2
This function shouldn't be called when using a newer fuse version, so we should not define it in that case.
2017-07-08Added public fuse_lib_help(), bumped minor versionNikolaus Rath-0/+19
2017-05-25Document RENAME_EXCHANGE and RENAME_NOREPLACE flags.Nikolaus Rath-2/+10
2017-04-12Improved documentation of fuse_context.private_dataNikolaus Rath-13/+20
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-07Document true meaning of the 'use_ino' option.Nikolaus Rath-1/+6
2016-11-29Improve documentation of fuse_session_unmountNikolaus Rath-0/+2
2016-11-29Return signal value if session loop is terminated by signal and improve ↵Nikolaus Rath-4/+9
documentation
2016-11-22Add support for FUSE_HANDLE_KILLPRIVNikolaus Rath-0/+12
Fixes #116.
2016-11-16Fix typo in commentNikolaus Rath-1/+1
2016-11-16Add support for more detailed error codes from main loopNikolaus Rath-2/+2
2016-11-06Fix documentation: fuse_file_info may be NULL for open filesNikolaus Rath-8/+12
This turns issue #62 from a bug into an enhancement :-).
2016-11-06Removed reference to fgetattr and ftruncate (don't exist anymore)Nikolaus Rath-3/+3
2016-11-06Fixed typo in comment.Nikolaus Rath-1/+1