aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_common.h
AgeCommit message (Collapse)AuthorLines
2024-01-20Add processing for FUSE_CAP_HANDLE_KILLPRIV and disable it by defaultbigbrotherwei-1/+1
'FUSE_CAP_HANDLE_KILLPRIV' is not enabled by default anymore, as that would be a sudden security issue introduced by a new ABI and API compatible libfuse version.
2024-01-10Don't set FUSE_CAP_PARALLEL_DIROPS by defaultMiklos Szeredi-2/+0
Allowing parallel dir operations could result in a crash in a filesystem implementation that is not prepared for this. To be safe keep this flag off by default (this is not a regression, since there was no public release where this flag wasn't ignored). If the filesystem wants better performance, then it should set this flag explicitly. Fixes: c9905341ea34 ("Pass FUSE_PARALLEL_DIROPS to kernel (#861)") Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2024-01-10Add FUSE_CAP_DIRECT_IO_ALLOW_MMAP and use in passthrough_hpBernd Schubert-0/+9
This is not called FUSE_CAP_DIRECT_IO_RELAX, as the kernel flag FUSE_DIRECT_IO_RELAX is supposed to be renamed to FUSE_DIRECT_IO_ALLOW_MMAP. The corresponding kernel patches just did not land yet.
2023-10-28Update fuse_common.h (#855)Caian Benedicto-1/+1
2023-08-08Released fuse-3.16.1Nikolaus Rath-1/+1
2023-06-30Make expire only function fail if no kernel support (#789)HereThereBeDragons-1/+1
2023-06-09Released 3.15.0Nikolaus Rath-1/+1
2023-04-11Update fuse_kernel.h to state of linux-6.3Bernd Schubert-0/+7
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-03Enable parallel direct writes on the same file.Dharmendra singh-2/+6
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-03-01Update description of keep_cache.Nikolaus Rath-5/+4
2023-02-17Released 3.14.0Nikolaus Rath-1/+1
2023-02-09Split config.h into private and public configBernd Schubert-0/+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-28Install a the configure_file (config.h) and use in headersBernd Schubert-0/+1
This addresses: https://github.com/libfuse/libfuse/issues/724 HAVE_LIBC_VERSIONED_SYMBOLS configures the library if to use versioned symbols and is set at meson configuration time. External filesystems (the main target, actually) include fuse headers and the preprocessor then acts on HAVE_LIBC_VERSIONED_SYMBOLS. Problem was now that 'config.h' was not distributed with libfuse and so HAVE_LIBC_VERSIONED_SYMBOLS was never defined with external tools and the preprocessor did the wrong decision. This commit also increases the the minimal meson version, as this depends on meson feature only available in 0.50 <quote 'meson' > WARNING: Project specifies a minimum meson_ version '>= 0.42' but uses features which were added in newer versions: * 0.50.0: {'install arg in configure_file'} </quote> Additionally the config file has been renamed to "fuse_config.h" to avoid clashes - 'config.h' is not very specific.
2023-01-13Released 3.13.0Nikolaus Rath-1/+1
2023-01-06adding comments and capability discovery, enum for flags moved to top of fileHereThereBeDragons-0/+16
2022-09-04fuse-loop/fuse_do_work: Avoid lots of thread creations/destructionsBernd Schubert-2/+8
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-1/+44
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-05-02Released 3.11.0Nikolaus Rath-1/+1
2022-01-03Add support for FOPEN_NOFLUSH flagAmir Goldstein-1/+5
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-10-09Released 3.10.0Nikolaus Rath-2/+2
2020-09-20Allow caching symlinks in kernel page cache. (#551)Etienne Dublé-0/+13
This commit defines a new capability called `FUSE_CAP_CACHE_SYMLINKS`. It is off by default but you can now enable it by setting this flag in in the `want` field of the `fuse_conn_info` structure. When enabled, the kernel will save symlinks in its page cache, by making use of the feature introduced in kernel 4.20: https://github.com/torvalds/linux/commit/5571f1e65486be025f73fa6aa30fb03725d362a2
2020-01-27Remove trailing comma in enums (#494)zsugabubus-2/+2
They are illegal in C89/90.
2019-12-31Bump FUSE_MINOR_VERSIONNikolaus Rath-1/+1
This was forgotten over several releases.
2019-11-27Added support for FUSE_EXPLICIT_INVAL_DATA to enable (#474)Albert Chen-0/+23
2019-09-04Introduce callback for loggingStefan Hajnoczi-0/+1
Introduce an API for custom log handler functions. This allows libfuse applications to send messages to syslog(3) or other logging systems. See include/fuse_log.h for details. Convert libfuse from fprintf(stderr, ...) to log_fuse(level, ...). Most messages are error messages with FUSE_LOG_ERR log level. There are also some debug messages which now use the FUSE_LOG_DEBUG log level. Note that lib/mount_util.c is used by both libfuse and fusermount3. Since fusermount3 does not link against libfuse, we cannot call fuse_log() from lib/mount_util.c. This file will continue to use fprintf(stderr, ...) until someone figures out how to split it up. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-08-23Shorten comment.Nikolaus Rath-5/+0
2019-08-23Improve description of READDIRPLUS_AUTO.Nikolaus Rath-0/+9
2019-08-23Clarify bitfield padding issue (#445)AsumFace-2/+8
* Clarify bitfield padding issue * Add a more elaborate note to fuse_file_info
2019-04-16Add documentation for opting out of opendir and releasedir (#391)Chad Austin-0/+12
2019-04-06Add support for in-kernel readdir caching.Nikolaus Rath-5/+13
Fixes: #394.
2019-04-06Various documentation improvementsAlan Somers-5/+16
See issue #389 for some related discussions.
2018-09-20Don't enable adaptive readdirplus unless fs has readdir() handler.Nikolaus Rath-4/+15
2017-11-27Spelling (#223)Josh Soref-2/+2
Fix spelling errors
2017-08-24Add idle_threads mount option.Joseph Dodge-1/+23
2017-07-08Added public fuse_lib_help(), bumped minor versionNikolaus Rath-1/+1
2017-07-08Fixed description of struct fuse_conn_info->time_granNikolaus Rath-2/+3
At least on Linux kernel 4.9, a value of zero gives more than 1-sec accuracy.
2017-06-08Clarify *_timeout semanticsNikolaus Rath-2/+2
When changes always come through kernel, timeouts should be large.
2017-03-15open(): fix documentation of O_TRUNC flagNikolaus Rath-1/+3
The FUSE_CAP_ATOMIC_IO_TRUNC capability is enabled by default, but we didn't update the open() documentation accordingly.
2016-11-29Return signal value if session loop is terminated by signal and improve ↵Nikolaus Rath-2/+2
documentation
2016-11-29Improve documentation of `fuse_file_info.keep_cache`Nikolaus Rath-2/+3
2016-11-22Document that FUSE_CAP_POSIX_ACL turns on -o default_permissionsNikolaus Rath-1/+5
2016-11-22Add support for FUSE_HANDLE_KILLPRIVNikolaus Rath-0/+9
Fixes #116.
2016-11-22Add support for FUSE_POSIX_ACLNikolaus Rath-0/+15
Fixes #117.
2016-11-22Added support for FUSE_PARALLEL_DIROPSNikolaus Rath-0/+10
Enabled by default since we haven't released libfuse 3.0 yet :-). Fixes #112.
2016-11-22Document fuse_conn_info.max_backgroundNikolaus Rath-4/+26
Fixes #95.
2016-11-16Enable more capabilities by default, and document defaults.Nikolaus Rath-7/+42
Fixes #112.
2016-11-16Document "congestion_threshold" parameter.Nikolaus Rath-4/+6
Fixes #96. Thanks to Maxim Patlasov <mpatlasov@virtuozzo.com> for help!
2016-11-14Make max_background and congestion_threshold "officially undocumented"Nikolaus Rath-3/+8
2016-11-14Improve documentation of FUSE_CAP_AUTO_INVAL_DATANikolaus Rath-2/+16
Fixes #84.
2016-11-14Improve description of FUSE_CAP_NO_OPEN_SUPPORT flag.Nikolaus Rath-1/+9
Fixes #107.