aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorLines
2025-06-17mount_util.c: check if utab exists before updateGeorgi Valkov-0/+4
Do not attempt to update /run/mount/utab if it doesn't exist. Note: if this path ever changes, utab updates will break. Fixes the following error when mounting iPhone using ifuse: ifuse /mnt --container com.httpstorm.httpstorm mount: mounting ifuse on /mnt failed: Invalid argument On OpenWRT by default mount-utils is not installed and utab does not exist. /bin/mount is a symlink to /bin/busybox and does not support updating of utab. If mount-utils is installed: /run/mount/ exists, but does not contain utab. The mount-utils instance is under /usr/bin/mount, so a hard-coded call to /bin/mount will still fail. Using /usr/bin/mount succeeds but does not create utab. [1] https://github.com/libfuse/libfuse/pull/1247 Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
2025-06-17Fix io-uring teardownBernd Schubert-4/+10
We need to write an uint64_t to eventfd. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-06-17example/passthrough_hp: Show fuse lowlevel help optionsBernd Schubert-0/+2
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-06-17Reformat passthrough_hp with clang-formatBernd Schubert-1260/+1300
Not ideal for git history, but the different formatting within the project is really disturbing. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-06-17build(deps): bump github/codeql-action from 3.28.19 to 3.29.0dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.19 to 3.29.0. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/fca7ace96b7d713c7035871441bd52efbe39e27e...ce28f5bb42b7a9f2c824e633a3f6ee835bab6858) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.29.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2025-06-13gitignore: add *.patchGeorgi Valkov-0/+1
When working with patches, git shows them as uncommitted changes. Ignore *.patch to keep the list of changes tidy. Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
2025-06-12help: Remove duplicate io_uring options from fuse_cmdline_helpizxl007-5/+1
The io_uring options are currently shown in both fuse_cmdline_help() and fuse_lowlevel_help(), which creates unnecessary duplication. Since io_uring is a low-level I/O feature, it makes more sense to only show these options in fuse_lowlevel_help(). This change: - Removes io_uring options from fuse_cmdline_help() - Keeps them in fuse_lowlevel_help() where they belong - Removes the FIXME comment that is no longer needed This is purely a documentation improvement and does not affect any functionality. Users will still see all available options when using --help, just organized in a more logical way. Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
2025-06-12tests: Add an exception for output "error"Bernd Schubert-2/+5
The sigterm test triggers debug output like dev unique: 6, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 1808 unique: 6, success, outsize: 96 dev unique: 8, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 1808 exit_handler called with sig 15 fuse: session exited, terminating workers unique: 8, error: -2 (No such file or directory), outsize: 16 Which then triggers test failures, because the test was acting on the word 'error'. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-06-12fuse_signals.c: fix build warning when HAVE_BACKTRACE is undefinedGeorgi Valkov-0/+2
BT_STACK_SZ and backtrace_buffer are not used when HAVE_BACKTRACE is undefined. Wrap them in #ifdef to avoid a build warning: ../lib/fuse_signals.c:31:14: warning: 'backtrace_buffer' defined but not used [-Wunused-variable] 31 | static void *backtrace_buffer[BT_STACK_SZ]; | ^~~~~~~~~~~~~~~~ Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
2025-06-12gitignore: add .DS_StoreGeorgi Valkov-0/+1
.DS_Store files are created all over the place on macOS Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
2025-06-10mount_bsd.c: Fix race between actual mounting and returning to the callerGleb Popov-1/+2
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2025-06-10build(deps): bump github/codeql-action from 3.28.18 to 3.28.19dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.18 to 3.28.19. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/ff0a06e83cb2de871e5a09832bc6a81e7276941f...fca7ace96b7d713c7035871441bd52efbe39e27e) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.28.19 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-06-05Update how to use the io_uring and io_uring_q_depth mount optionsizxl007-25/+6
This patch updates how to use the io_uring and io_uring_q_depth mount options. There are two reasons for this: 1. It is recommended for end-users to use a format like “-o io_uring" (with a space) in README.fuse-io-uring. This is because, in the passthrough_hp example, cxxopts does not support the "-oio_uring" format (without a space), and using it would result in a syntax error. 2. Remove redundant "--uring" and "--uring-q-depth=" from passthrough_hp example. Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
2025-05-28fuse_lowlevel.c: Remove duplicate descriptions of auto_unmountizxl007-1/+0
Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
2025-05-22Fix build in musl libcLuis Henriques-7/+6
Function fuse_set_thread_name() assumes that pthread_t is an unsigned long and fails to compile in musl libc with the following: ../lib/util.c: In function 'fuse_set_thread_name': ../lib/util.c:48:28: error: passing argument 1 of 'pthread_setname_np' makes \ pointer from integer without a cast [-Wint-conversion] Fix fuse_set_thread_name() by dropping the 'tid' parameter, as it is always set to pthread_self(). Signed-off-by: Luis Henriques <luis@igalia.com>
2025-05-20conn->want conversion: Fix fuse_apply_conn_info_opts()Bernd Schubert-106/+187
fuse_apply_conn_info_opts() was applying to 'want_ext', which would cause conflicts with 'want' if the application applied its own flags to 'conn->want'. Solution is: - to move fuse_{set,unset,get}_feature_flag and convert_to_conn_want_ext() to fuse_lowlevel.c and to define them as part of the public API, although convert_to_conn_want_ext() should not be used - it is currently needed to be a public function due as it needs to be defined for the tests. Related to https://github.com/libfuse/libfuse/issues/1171 and https://github.com/libfuse/libfuse/pull/1172. Closes: https://github.com/libfuse/libfuse/issues/1171 Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-05-20Make conn->want/want_ext conversion non fatalBernd Schubert-27/+3
there are too many issues with conn->want and conn->want_ext conversion, for now just log a warning, but setting both flags is now not fatal anymore. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-05-20build(deps): bump github/codeql-action from 3.28.17 to 3.28.18dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.17 to 3.28.18. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/60168efe1c415ce0f5521ea06d5c2062adbeed1b...ff0a06e83cb2de871e5a09832bc6a81e7276941f) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.28.18 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-05-19build(deps): bump github/codeql-action from 3.28.16 to 3.28.17dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.16 to 3.28.17. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/28deaeda66b76a05916b6923827895f2b14ab387...60168efe1c415ce0f5521ea06d5c2062adbeed1b) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.28.17 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-04-30Support request timeoutsJoanne Koong-1/+12
This adds the libfuse changes needed to support request timeouts. A timeout may be set by the server in its init call. If a request is not completed by the timeout, the connection will be aborted by the kernel. Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
2025-04-30Update include/fuse_kernel.h to version 7.43Joanne Koong-2/+8
Sync include/fuse_kernel.h with the most up to date fuse uapi headers in the kernel. Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
2025-04-29fuse_lowlevel.c: Fix a small spelling mistakeizxl007-1/+1
Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
2025-04-29build(deps): bump github/codeql-action from 3.28.15 to 3.28.16dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.15 to 3.28.16. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/45775bd8235c68ba998cffa5171334d58593da47...28deaeda66b76a05916b6923827895f2b14ab387) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.28.16 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28lib/fuse.c: refactor handler logic for readabilityJoanne Koong-450/+399
Refactor handler logic to make it more readable. No functional changes. Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
2025-04-28Add a README for fuse-over-io-uringBernd Schubert-2/+39
Also update the comment description of fuse_uring.c Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28Set FUSE_CAP_OVER_IO_URING flag - allow io-uring modeBernd Schubert-0/+3
So far it was disabled as the series was not complete yet. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28env variables to override default io-uring enable and q-depthBernd Schubert-2/+18
We want to especially test with and without io-uring being enabled. Ideally without modifying all tests - that is what the env variable can be used for. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28passthrough_hp: Add io-uring optionsBernd Schubert-4/+25
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28Add fuse_req_is_uring() to check if a req comes through io-uringBernd Schubert-0/+15
This might be useful to optimize code paths. For example, with io-uring the request buffer is valid until the request is replied to, while without io-uring the request buffer is only valid in current thread context. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28fuse: Add io-uring optionsBernd Schubert-2/+18
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28fuse_common.h: Prefix flags with 1ULBernd Schubert-29/+29
Ensure it is correctly stored in an unsigned 32 bit int. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28Add fuse-io-uring reply supportBernd Schubert-27/+222
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28Add fuse_session_process_uring_cqeBernd Schubert-37/+111
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28Add a basic io-uring cqe handlerBernd Schubert-3/+92
Not function yet, just preparation. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28fuse_ll_ops: Make fuse_ino_t constBernd Schubert-1/+1
It will never be modified, should be const. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28fuse_lowlevel: Split fuse_send_msgBernd Schubert-19/+32
The actual function to write to /dev/fuse is offloaded into _fuse_send_msg() Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28Add support for ring creation in fuse_lowlevel.cBernd Schubert-3/+63
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28fuse: Add ring creationBernd Schubert-3/+630
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28Add a fuse_set_thread_name() helperBernd Schubert-7/+23
Avoid splattering the code with ifdef Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28Add container_of and ROUND_UP macrosBernd Schubert-8/+6
Needed by follow up commits. container_of is actually just moved/consolidated to util.h. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28fuse_lowlevel: Add support for header/payload separationBernd Schubert-171/+608
Header/payload separation is part of the fuse-io-uring protocol and might be later on for /dev/fuse legacy communication as well. This is a preparation commit, for now fuse_ll_ops2 is unused. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28Synchronize fuse_kernel.h with linux-6.14Bernd Schubert-2/+101
Also add FUSE_CAP_OVER_IO_URING Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-28Add fuse-io-uring dependencies to github workfow filesBernd Schubert-3/+4
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-26meson.build: make special_funcs check more reliableGiulio Benetti-2/+2
Unfortunately while cross-compiling with build tools like Buildroot it happens to have repeated flags or anything that could lead to a warning. This way the check fails because of a warning not related to the special function. So let's use cc.links() and increase minimum meson_version to 0.60 since cc.links() has been added during that version. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2025-04-25Fix meson function testsBernd Schubert-18/+49
Several meson tests were incorrectly failing Checking for function "static_assert" : NO (cached) Checking for function "pthread_setname_np" : NO (cached) Check usable header "#include <linux/close_range.h>" : NO (cached) These functions get now tested with compilation tests and get found on my system. Checking if "static_assert check" compiles: YES Checking if "pthread_setname_np check" compiles: YES Checking if "close_range check" compiles: YES Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-24Fix test/test_examples.py::test_passthroughBernd Schubert-6/+51
The test had multiple issues - default passthrough_ll timeout was used - the created file was then not listed if timeout was not passed yet - mnt_name was actually point to src_dir, file comparison of stat, etc succeeded, because the same file was compared. Switching to the right dir made stat to always fail, because st_dev is different for source and mount. I.e. the test must not compare all stat values. Not sure how this test ever passed, but in a very slow debug VM with lots of kernel debug options enabled, the default passthrough_ll timeout it systematically failed. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-24Fix multi-threaded fuse session exitBernd Schubert-39/+277
Issue with previous code was that fuse_session_exit() didn't wake up the semaphore in fuse_loop_mt.c. Lock, semaphore and all uses of checking for "exited" are now moved to struct fuse_session to have it available for the signal handler. This also removes internal fuse_session_reset() calls, as that makes testing hard. From git history I also don't see why it was added. Closes: https://github.com/libfuse/libfuse/issues/997 Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-04-23signal handlers: Store fuse_session unconditionallyBernd Schubert-4/+9
Commit dae1184 ("Add syslog and fatal signal handler feature") added fuse_set_fail_signal_handlers() which can store "se". But as fuse_set_signal_handlers() also stores the object storing it was made conditionally if not set already. As per https://github.com/libfuse/libfuse/issues/1182 this breaks some applications like osspd, that have multiple sessions and rely on the right order and that the last call of fuse_set_signal_handlers() wins. Special thanks to Sébastien Noel to debug this issue. Closes: https://github.com/libfuse/libfuse/issues/1182 Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-04-23example: fix memfs_rename deadlock errorswj-4/+5
Signed-off-by: swj <1186093704@qq.com>
2025-04-23Check if pthread_setname_np() exists before use itGiulio Benetti-1/+6
Since pthread_setname_np() is the only pthread function that requires NPTL and it basically only set thread name, let's check if pthread_setname_np() does exist, otherwise let's not call pthread_setname_np() to shrink dependencies. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>