aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_lowlevel.h
AgeCommit message (Collapse)AuthorLines
2023-01-04convert __APPLE__ and __ULIBC__ to HAVE_LIBC_VERSIONED_SYMBOLSBernd Schubert-2/+2
In fact only gnu-libc fully supports symbol versioning, so it is better to have a generic macro for it. This also allows to manually disable symbol version and allows to run tests with that configuration on gnu-libc. That testing will still not catch compat issues, but least ensures the code can compile. Testing for __APPLE__ and __ULIBC__ is now done by meson. More of such checks can be added by people using other libcs.
2023-01-02Revert "libfuse custom communication interface"Nikolaus Rath-19/+0
This reverts commit 777663953382925c7403f0560c28ec9bbd14d7be.
2022-11-15libfuse custom communication interfacey-0/+19
libfuse can now be used without having a mount interface.
2022-09-04fuse-loop/fuse_do_work: Avoid lots of thread creations/destructionsBernd Schubert-1/+22
On benchmarking metadata operations with a single threaded bonnie++ and "max_idle_threads" limited to 1, 'top' was showing suspicious 160% cpu usage. Profiling the system with flame graphs showed that an astonishing amount of CPU time was spent in thread creation and destruction. After verifying the code it turned out that fuse_do_work() was creating a new thread every time all existing idle threads were already busy. And then just a few lines later after processing the current request it noticed that it had created too many threads and destructed the current thread. I.e. there was a thread creation/destruction ping-pong. Code is changed to only create new threads if the max number of threads is not reached. Furthermore, thread destruction is disabled, as creation/destruction is expensive in general. With this change cpu usage of passthrough_hp went from ~160% to ~80% (with different values of max_idle_threads). And bonnie values got approximately faster by 90%. This is a with single threaded bonnie++ bonnie++ -x 4 -q -s0 -d <path> -n 30:1:1:10 -r 0 Without this patch, using the default max_idle_threads=10 and just a single bonnie++ the thread creation/destruction code path is not triggered. Just one libfuse and one application thread is just a corner case - the requirement for the issue was just n-application-threads >= max_idle_threads. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2022-09-04API update for fuse_loop_config additionsBernd Schubert-19/+22
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>
2021-05-19Define FUSE_USE_VERSION in Doxygen. (#608)Junichi Uekawa-5/+5
We currently do not pass anything in PREDEFINED and that means FUSE_USE_VERSION is undefined. Add that definition so that Doxygen built-in C pre-processor can use FUSE_USE_VERSION value to find the correct comment to parse.
2021-05-07Fix doxygen warnings. (#600)Junichi Uekawa-5/+5
Some parameters were undocumented, and @file does not mean to expand current file name.
2021-04-23Add missing exceptions to fuse_reply_err() documentation. (#597)Manuel Jacob-1/+1
Co-authored-by: Manuel Jacob <test>
2021-03-30Fix typo in fuse_lowlevel.h (#593)Tobias Nießen-1/+1
2021-01-10Fix typo (#578)Feverfew-1/+1
2020-08-09Define fuse_session_loop_mt as a macro on uclibc and MacOS (#532)asafkahlon-0/+5
On uclibc and MacOS we don't use versioned symbols. Hence, there's no definition for fuse_session_loop_mt on those cases and the linker won't be able to resolve calls to fuse_session_loop_mt() Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
2019-12-31Make ioctl prototype conditional on FUSE_USE_VERSION. (#482)Bill Zissimopoulos-1/+7
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/+33
2019-05-24Remove incorrect comment about fuse_entry_param.generation (#420)Alan Somers-3/+0
A comment said that fuse_entry_param.generation must be non-zero. However, I can't find anything in the kernel that requires that, and real-world file systems don't seem to follow that advice, either.
2019-04-16Add documentation for opting out of opendir and releasedir (#391)Chad Austin-0/+7
2019-03-11Defined the (*ioctl)() commands as unsigned int (#381)Jean-Pierre André-2/+5
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-2/+6
Fixes: #373
2019-03-09Improve readdir() and file handle documentationChad Austin-11/+22
Fixes: #333
2019-01-21Clarify documentation of fuse_lowlevel_inval_inodeNikolaus Rath-8/+8
Fixes: #341.
2018-11-19libfuse: add copy_file_range() supportNiels de Vos-0/+36
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-06Document when `fuse_lowlevel_notify_*` functions may block.Nikolaus Rath-0/+13
2018-09-20Clarify what qualifies as a "related operation" for notify_inval_entry.Nikolaus Rath-6/+13
2018-07-04Document that access() is also called on chdir().Nikolaus Rath-3/+3
Source: Miklos Szeredi on fuse-devel, Wednesday, 4 July 2018 15:29.
2017-11-27Spelling (#223)Josh Soref-2/+2
Fix spelling errors
2017-08-24Add idle_threads mount option.Joseph Dodge-3/+8
2017-08-22Document and unify error codes of fuse_lowlevel_notify_*Nikolaus Rath-12/+31
2017-08-22Document meaning of zero telldir() offset.Nikolaus Rath-15/+7
2017-08-06Clarified documentation for fuse_parse_cmdline()Nikolaus Rath-0/+3
2017-08-06Clarify how the filesystem should handle open/create flagsNikolaus Rath-12/+29
2017-08-03Simplify and fix FreeBSD fsname handlingNikolaus Rath-4/+0
This should simplify the code a lot. It also corrects a bug in that the (former) add_default_fsname() function actually set the -osubtype option.
2017-08-03FreeBSD: supprt fsname= optionBaptiste Daroussin-0/+4
2017-07-08Added public fuse_lib_help(), bumped minor versionNikolaus Rath-1/+1
2017-07-07Error out if FUSE_USE_VERSION is not definedNikolaus Rath-1/+1
This is safer than making assumptions.
2017-06-08Clarify *_timeout semanticsNikolaus Rath-2/+8
When changes always come through kernel, timeouts should be large.
2017-05-31Clarify that destroy() is called without kernel connectionNikolaus Rath-2/+4
2017-05-25Fix typo in comment.Nikolaus Rath-1/+1
2017-05-25Document RENAME_EXCHANGE and RENAME_NOREPLACE flags.Nikolaus Rath-0/+7
2017-03-15open(): fix documentation of O_TRUNC flagNikolaus Rath-8/+2
The FUSE_CAP_ATOMIC_IO_TRUNC capability is enabled by default, but we didn't update the open() documentation accordingly.
2016-11-29Improve documentation of fuse_session_unmountNikolaus Rath-1/+20
2016-11-29Return signal value if session loop is terminated by signal and improve ↵Nikolaus Rath-6/+22
documentation
2016-11-22Add support for FUSE_HANDLE_KILLPRIVNikolaus Rath-0/+10
Fixes #116.
2016-11-16Add support for more detailed error codes from main loopNikolaus Rath-2/+2
2016-11-16Fix typo in commentNikolaus Rath-1/+1
2016-11-16Document special semantics of ENOSYS error code.Nikolaus Rath-2/+79
2016-11-14Improve getattr() descriptionNikolaus Rath-1/+9
When writeback caching is enabled, the st_size value reported by the filesystem may be ignored.
2016-10-28Clean-up doxygen documentationNikolaus Rath-6/+1
Fixes: #81.
2016-10-27Removed some more "Changed in version x.py" comments.Nikolaus Rath-3/+0
2016-10-27Recommend when to use -o default_permissions automaticallyNikolaus Rath-0/+6
2016-10-25Clarify difference between notify_inval_entry and notify_delete().Nikolaus Rath-3/+8
Fixes #85.
2016-10-24fuse_session_new(): don't accept empty argv, check argv[0]Nikolaus Rath-0/+6
This should help avoid people to accidentally put options into argv[0]. Fixes #100.