aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorLines
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>
2025-06-25passthrough_hp: Abstract out the fd -> path transitionGleb Popov-12/+31
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2025-06-25memfs_ll: Fix compiling on non-Linux OSesGleb Popov-0/+2
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2025-06-25examples: Guard inclusions of Linux headers with appropriate ifdefsGleb Popov-1/+5
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2025-06-25meson: Check for some Linux-specific headersGleb Popov-0/+7
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2025-06-25Catch up with fuse_send_data_iov() signature changes in the fallback caseGleb Popov-2/+3
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2025-06-22Clarify offset field is signed despite uint64_t typeizxl007-0/+4
Add comment noting that the uint64_t offset in fuse_lseek_in is derived from kernel loff_t and should be treated as signed for negative offsets. Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
2025-06-18example/ioctl_client: Delete the redundant commentizxl007-2/+0
Signed-off-by: izxl007 <zeng.zheng@zte.com.cn>
2025-06-18tests: example: add new test for increment epochLuis Henriques-11/+43
This patch modifies the notify_inval_entry.c example so that it includes an extra option to use fuse_lowlevel_notify_increment_epoch(). The test test_notify_inval_entry() was also modified to test this extra option. Signed-off-by: Luis Henriques <luis@igalia.com>