aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorLines
7 daysbuild(deps): bump github/codeql-action from 3.30.3 to 3.30.5HEADmasterdependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.3 to 3.30.5. - [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/192325c86100d080feab897ff886c34abd4c83a3...3599b3baa15b485a2e49ef411a7a4bb2452e7f93) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.30.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-09-22FUSE_INIT handler: Set got_init only shortly before send_reply_okBernd Schubert-1/+7
A previous commit added single thread behavior as long as se->got_init is not set, especially as buffer allocation should be done after got_init only. Technically it should not make a difference in current libfuse design, as more worker threads are only allocated after the FUSE_INIT handler is completely done. That might at some point change, though. In general it is cleaner to set se->got_init, when the init handler is done. Done as separate commit, as this introduces a slight risk to break something - backport to older version should be done carefully. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-09-22fuse_loop_mt: Don't create new workers before init is receivedBernd Schubert-1/+2
This is to prevent startup races. For example it is hard for threads to know the buffer size the kernel usage. In the past kernel buffer size always was max 1MB, but in the mean time this might be more, depending on system tunings. I thought I had fixed all races, but the report in issue #1296 proves otherwise. Closes: https://github.com/libfuse/libfuse/issues/1296 Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-09-19io-uring: re-initialize fields in struct fuse_reqBernd Schubert-19/+26
In io-uring mode these requests are always re-used and not allocated - we need to re-initialize them. In order to set flags to zero a struct holding the flags had to be added. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-09-19fuse_log: Add __attribute__((format(printf, ) and fix warningsBernd Schubert-30/+41
fuse_log() did not have that attribute and so compilers didn't give warnings for plain printf(). Add the attribute and fix related warnings. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-09-19fuse_lowlevel.c: allow passing ops as NULLAlik Aslanyan-1/+27
During testing of LACT using various sanitizers issue with libfuse.so leaking memory and reading uninitialized memory was uncovered. While this was due to ABI misusage on the side of fuser (Rust wrapper for libfuse.so), we now allow creating a no-op session by passing ops as NULL. fuser and other libfuse users is using fuse_session_new() with NULL struct fuse_lowlevel_ops *op and op_size=0. This resulted in a warning, but otherwise succeeded. The resulting fuse_session is just passed to fuse_session_mount() so that libfuse could do the actual mount. Fuse kernel request handling is not done through libfuse but their own layer. Edit by Bernd: - Update the commit message - moved using null_ops to fuse_session_new_30() as that is actually called by the external fuse_session_new(). - forbidding NULL struct fuse_lowlevel_ops *op and 0 op_size in fuse_session_new_versioned() - various other NULL ptr checks in fuse_session_new() that now result in failure. Signed-off-by: Alik Aslanyan <inline0@pm.me> Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-09-16libfuse: don't put HAVE_STATX in a public headerDarrick J. Wong-10/+4
fuse.h and fuse_lowlevel.h are already forward declaring struct statx, there is no need for HAVE_STATX anymore. HAVE_STATX also bears the risk to conflict with an application define. Alternatively it would have been possible to change to HAVE_FUSE_STATX. Get rid of the conditionals in the public header files and also remove HAVE_STATX definition from the public libfuse_config.h. Edit by Bernd: Commit message and removal of HAVE_STATX from public libfuse_config.h. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-09-16build(deps): bump github/codeql-action from 3.30.1 to 3.30.3dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.1 to 3.30.3. - [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/f1f6e5f6af878fb37288ce1c627459e94dbf7d01...192325c86100d080feab897ff886c34abd4c83a3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.30.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-09-13libfuse: fix COPY_FILE_RANGE interfaceMiklos Szeredi-6/+73
The FUSE protocol uses struct fuse_write_out to convey the return value of copy_file_range, which is restricted to uint32_t. But the COPY_FILE_RANGE interface supports a 64-bit size copies. Currently the number of bytes copied is silently truncated to 32-bit, which is unfortunate at best. Implement the COPY_FILE_RANGE_64 interface which is identical to the old one, except the number of bytes copied is returned in a 64-bit value. The library interface remains the same. If the kernel does not support the new interface or the server is running as a 32-bit process, limit the copy size to size to UINT_MAX - 4096. Edit by Bernd: Keep ioctl_64bit and add use new bit is_copy_file_range_64 to keep flags separated from each other - easier code readability IMO. Reported-by: Florian Weimer <fweimer@redhat.com> Closes: https://lore.kernel.org/all/lhuh5ynl8z5.fsf@oldenburg.str.redhat.com/ Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-09-09build(deps): bump actions/setup-python from 5 to 6dependabot[bot]-2/+2
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
2025-09-09build(deps): bump github/codeql-action from 3.29.11 to 3.30.1dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.11 to 3.30.1. - [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/3c3833e0f8c1c83d449a7478aa59c036a9165498...f1f6e5f6af878fb37288ce1c627459e94dbf7d01) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.30.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2025-08-31build(deps): bump github/codeql-action from 3.29.10 to 3.29.11dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.10 to 3.29.11. - [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/96f518a34f7a870018057716cc4d7a5c014bd61c...3c3833e0f8c1c83d449a7478aa59c036a9165498) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.29.11 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-08-22Fix passthrough_hp.cc indentationBernd Schubert-14/+14
Commit f8fe398ee14864e2c3c7c524ca851d7cc08bed28 introduced an invalid passthrough_hp.cc indentation and that was not detected by checkpatch, as that only handles C files. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-08-22send_reply_uring: Avoid memcpy if src and dest are identicalBernd Schubert-1/+2
The application might have just written directly into the payload to no need to copy it and in fact, using memcpy would be undefined behavior. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-08-22Allow applications to retrieve the req payload (io-uring only)Bernd Schubert-4/+87
With io-uring the req owns the payload buffer, the application can directly access it and copy data into it. fuse_buf_copy_one() already has a check for dstmem == srcmem and skips data copies. fuse_reply_data fuse_reply_data_uring fuse_buf_copy fuse_buf_copy_one Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-08-22fuse-io-uring: Release io-uring resources on io-uring startup failureBernd Schubert-0/+5
Operation might continue without io-uring, so just free these resources. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-08-22fuse-io-uring: Fix double count of ring_pool->failed_threadsBernd Schubert-3/+0
This is already done a few lines below. And actually no reason to hold the lock at all given the variables are atomics now. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-08-22io-uring startup: Fix spinning and variable readBernd Schubert-10/+15
Reported-by: lixianming <lixianming.19951001@bytedance.com> Closes: https://github.com/libfuse/libfuse/pull/1317 Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-08-19build(deps): bump github/codeql-action from 3.29.8 to 3.29.10dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.8 to 3.29.10. - [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/76621b61decf072c1cee8dd1ce2d2a82d33c17ed...96f518a34f7a870018057716cc4d7a5c014bd61c) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.29.10 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-08-19tests: move struct size assertions into a testCismonX-16/+25
These checks are meant for libfuse maintainers only, and should not be exposed to users. Signed-off-by: CismonX <admin@cismon.net>
2025-08-12fuse_loop_mt.c: fix close-on-exec flag on clone fdCismonX-3/+9
Closes: https://github.com/libfuse/libfuse/issues/1310 Signed-off-by: CismonX <admin@cismon.net>
2025-08-12build(deps): bump github/codeql-action from 3.29.7 to 3.29.8dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.7 to 3.29.8. - [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/51f77329afa6477de8c49fc9c7046c15b9a4e79d...76621b61decf072c1cee8dd1ce2d2a82d33c17ed) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.29.8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12build(deps): bump actions/checkout from 4 to 5dependabot[bot]-8/+8
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
2025-08-05build(deps): bump github/codeql-action from 3.29.3 to 3.29.5dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.3 to 3.29.5. - [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/d6bbdef45e766d081b84a2def353b0055f728d3e...51f77329afa6477de8c49fc9c7046c15b9a4e79d) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.29.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-08-04Update issue templatesBernd Schubert-16/+27
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-08-04mount_bsd.c: Actually report mount failures back to callerGleb Popov-1/+3
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2025-07-22high level: Remove the nullpath_ok log messageBernd Schubert-4/+0
This seems to be a left over - the file system has to set this variable in its ->init method, i.e. logging it in startup is not giving any helpful output. Closes: https://github.com/libfuse/libfuse/issues/1272 Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-07-22fuse_uring_i.h: Include errno.hBernd Schubert-0/+2
Needed for ENOTSUP Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-07-22Split fuse-io-uring startupBernd Schubert-9/+71
Start the ring threads before sending fuse_reply_ok() so that io-uring startup issues can be non-fatal. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-07-22Simplify meson condition for liburingBernd Schubert-4/+2
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-07-22fuse-io-uring: Add sanity check for the number of queue entriesBernd Schubert-2/+7
fuse-io-uring would create a blocking mount with 0 queue entries, we need a sanity check for it. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-07-22fuse-over-io-uring: Remove handling of -EOPNOTSUPPBernd Schubert-11/+3
-EOPNOTSUPP was in early RFC kernel patches, but merged version does not have this handler anymore. Closes: https://github.com/libfuse/libfuse/issues/1283 Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-07-22build(deps): bump github/codeql-action from 3.29.2 to 3.29.3dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.2 to 3.29.3. - [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/181d5eefc20863364f96762470ba6f862bdef56b...d6bbdef45e766d081b84a2def353b0055f728d3e) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.29.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21example/memfs_ll: Avoid nullptr field initializations by pragmaBernd Schubert-29/+3
These nullptr initializations don't make sense - methods that are not explicitly set are not implemented. I thought that C++20 would eventually avoid the nullptr, but looks like compilers still give warnings - avoid them with a pragma. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-07-16memfs_ll: fix deadlock in truncate operationLong Li-1/+0
Remove redundant mutex lock acquisition in the truncate() method to prevent deadlock. The issue occurs when memfs_setattr() already holds the mutex lock and then calls truncate(), which attempts to acquire the same lock again. Signed-off-by: Long Li <leo.lilong@huawei.com>
2025-07-16Avoid double unmount on FUSE_DESTROYBernd Schubert-12/+24
This is a long standing issue, a system could have unmounted /path/to/mnt and then fuse-client/kernel would send FUSE_DESTROY, which would then again try a umount. Given that FUSE_DESTROY is async, that umount might arrive any time later and might possibly unmount a wrong mount point. A warning as in issue #1286 is just minor to that. Code wise this uses atomics to free the char *, as FUSE_DESTROY might race with a signal and a double free might be possible without proctection. A lock might run into the same issue, if the signal would arrive at the wrong time a double lock would be possible. Additionally, fuse_session_mount() is updated, to first duplicatate the pointer and to then do the kernel mount - reverting the kernel mount in case of strdup() failure is much harder. Closes: https://github.com/libfuse/libfuse/issues/1286 Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-07-16fusermount: close_range seems to be available on bsdBernd Schubert-1/+3
According to https://man.freebsd.org/cgi/man.cgi?close_range(2) we just need to remove the linux include. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-07-16fusermount: Fix the close_range ifdefBernd Schubert-2/+2
This fixes commit 82bcd818 That commit had removed HAVE_LINUX_CLOSE_RANGE in meson generation, but didn't remove the usage in fusermount.c - fusermount was then not using the close_range syscall. Closes: https://github.com/libfuse/libfuse/issues/1284 Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-07-16Add statx supportJoanne Koong-2/+391
This commit adds libfuse support for FUSE_STATX requests on linux distributions. Currently, statx is only supported on linux. To make the interface a ergonomic as possible (eg using native 'struct statx' vs 'struct fuse_statx'), this implementation gates the 'struct statx' changes by #ifdef linux. Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
2025-07-15Switch to c++20Bernd Schubert-2/+2
This only effects example/{passthrough_hp.cc,memfs_ll.cc} and is mainly to avoid these warnings ../example/memfs_ll.cc:1100:1: warning: missing field 'statx' initializer [-Wmissing-designated-field-initializers] Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-07-13example/passthrough: support fspacectl()CismonX-1/+14
FreeBSD 14 introduced a new system call, fspacectl(). Currently, it supports one operation mode, SPACECTL_DEALLOC, which is functionally equivalent to Linux fallocate() with FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE flags. fspacectl() calls with SPACECTL_DEALLOC is supported on FUSE filesystems via FUSE_FALLOCATE with the aforementioned flags. Signed-off-by: CismonX <admin@cismon.net>
2025-07-13example/passthrough: tidy up passthrough_helpers.hCismonX-5/+17
Add header guards, include system headers as needed, and declare helper functions as inline. This ensures that the helper header could be properly included. Signed-off-by: CismonX <admin@cismon.net>
2025-07-13example/passthrough: refactor fallocateCismonX-39/+27
Move fallocate implementation to passthrough_helpers.h, so that it could be reused by multiple passthrough examples. Signed-off-by: CismonX <admin@cismon.net>
2025-07-08build(deps): bump github/codeql-action from 3.29.0 to 3.29.2dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.0 to 3.29.2. - [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/ce28f5bb42b7a9f2c824e633a3f6ee835bab6858...181d5eefc20863364f96762470ba6f862bdef56b) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.29.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-06-27license: s/COPYING/GPL2.txt, s/COPYING.LIB/LGPL2.txtizxl007-55/+55
Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
2025-06-27passthrough_hp: Fix unused function warningGleb Popov-1/+1
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2025-06-27memfs_ll: Fix unused variable warningGleb Popov-0/+2
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2025-06-25FreeBSD: test runnerVassili Tchersky-0/+33
Draft version of a yet simple runner that just build libfuse under FreeBSD and show the compile log.
2025-06-25meson: Enable building C++ examples on FreeBSDGleb Popov-1/+1
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2025-06-25passthrough_hp: Fix compilation on systems without O_TMPFILE supportGleb Popov-1/+4
Signed-off-by: Gleb Popov <6yearold@gmail.com>