aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorLines
2025-01-24build(deps): bump github/codeql-action from 3.28.0 to 3.28.1dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.0 to 3.28.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/48ab28a6f5dbc2a99bf1e0131198dd8f1df78169...b6a472f63d85b9c78a3ac5e89422239fc15e9b3c) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2025-01-13Update doxygen/comments for fuse_reply_open/fuse_reply_createBernd Schubert-2/+4
Comments for fuse_reply_open and fuse_reply_create and with that doxygen had not been updated for parallel_direct_writes and others. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2025-01-13Identify the FD hold by parent processZegang-0/+17
Issue: There is no directly way to get the FD hold by parent process which asked do fuse mount. Use Case: For auto_unmount case, identify the FD can easy to close the FD and make automatically unmount manually and explicitly. The FD[1] can be got via getenv(FUSE_COMMFD2_ENV). One potential use case is to satisfy FD-Leak checks. Solution: Add an extra env _FUSE_COMMFD2 to store the FD. This will provide a easy way to get the FD via FUSE_COMMFD2_ENV. Signed-off-by: Zegang Luo <zegang.luo@qq.com>
2025-01-06Make fuse_main_real() not symboledBernd Schubert-29/+45
Addresses https://github.com/libfuse/libfuse/issues/1092 We actually don't need to make fuse_main_real() symboled, as it is not part of the official API. The inlined function now always calls into fuse_main_real_317 and the compat ABI function (which should also be available for dlopen/dlsym) is now always compiled, independent if the compiler/linker support versioned symbols. Additionally, fuse_main_real() is also declared as inlined function and a warning message is created when that function is called. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-06checkpatch: Disable warning for externs in C filesBernd Schubert-1/+1
We do actually need these, at least for compat.c. Also disable git commit id warnings, these are doing more harm than good (for example trigger long line warnings when fulfilled). Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-06Avoid global declarion of internal functions that are new in 3.17Bernd Schubert-34/+44
_fuse_new() is not supposed to be called by external users outside of internal functions or static inlined functions. This also removes several functions from lib/fuse_versionscript which where added and exported by commit 58f85bfa9b7d ("Add in the libfuse version a program...) as these are libfuse internal only. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-06Fix fuse_main_real symbolsBernd Schubert-2/+29
Commit 58f85bfa9b7d ("Add in the libfuse version a program...") forgot to add a fuse_main_real function for libfuse compilations that are not symboled. That is now added in compat.c. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-03Fix junk readdirplus results when filesystem not filling stat infoAmir Goldstein-4/+7
Commit dd95d13a ("fix readdirplus when filler is called with zero offset (#896)) broke readdirplus with passthrough example command: passthrough -o auto_cache,modules=subdir,subdir=/src /mnt The /src directory looks like this: ~# ls -l /src total 0 drwx------ 3 root root 60 Jan 2 17:51 testdir And the fuse directory looks like this: ~# ls -l /mnt total 0 d--------- 0 root root 0 Jan 1 1970 testdir Because readdir_fill_from_list() ignores the fact that filesystem did not pass the FUSE_FILL_DIR_PLUS flag with valid stat info. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2025-01-03example/passthrough: Enable testing of readdirplus without fill offsetsAmir Goldstein-6/+13
passthrough example supports the --plus command line argument to reply to readdirplus with fill_dir_plus and unspecified (0) fill offsets. As explained in this comment: https://github.com/libfuse/libfuse/pull/896#issuecomment-1978917041 passthrough example needs a few more changes to be able to test commit dd95d13a ("fix readdirplus when filler is called with zero offset (#896)) With the changes in this commit, readdirplus without fill offsets can be tested to verify the readdirplus fix above with command line: passthrough --plus -o auto_cache,modules=subdir,subdir=/src /mnt Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2025-01-03Fix build of memfs_ll without manual meson reconfigureAmir Goldstein-0/+1
After pulling latest code, memfs_ll build would fail because it builds with C++11. Changing the default of cpp_std in meson.build is not enough to fix this problem even if user runs 'meson setup --reconfigure'. I had to run 'meson setup -Dcpp_std= --reconfigure' to fix the build as mentioned in this meson issue: https://github.com/mesonbuild/meson/issues/8062#issuecomment-1568249672 Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2025-01-03Fix libfuse build with FUSE_USE_VERSION 30Amir Goldstein-1/+9
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2025-01-02Remove the DCO checkBernd Schubert-28/+0
Actually checkpatch.pl already checks for "Signed-off-by" and also handles merge commits - no need for duplicate logic. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-02Fix the checkpatch.pl workflowBernd Schubert-2/+11
- The MAINTAINERS test is not valid for libfuse. - Correct the base commit Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-02.github/workflows/codespell.yml: checkpatch.pl needs to be skippedBernd Schubert-0/+2
checkpatch.pl has a list of mispelled words and the codespell test fails on that. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-02Update AUTHORS for 3.17 and add script for thatBernd Schubert-1/+64
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-01Add a checkpatch.pl github workflowBernd Schubert-0/+7842
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-01Add a github action to check for "Signed-off-by"Bernd Schubert-0/+28
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-01Run github workflow actions on release branchesBernd Schubert-5/+16
Running on the 'master' is not enough, actions also need to run on release branches. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-01Update ChangeLog.rst for 3.17 (#1085)Bernd Schubert-4/+30
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2025-01-01passthrough_ll: set correct keep_cache flag in opendir (#1083)Amir Goldstein-1/+3
In cache=always mode, set keep_cache flag in opendir(), same as done in open() and same as passthrough_hp does in opendir(). In the default cache=auto mode, use readdir cache, but do not set keep_cache, same as regular files use page cache for an open file, but do not keep_cache for a new open. Note that passthrough_hp by default behaves the same as passthrough_ll cache=always mode and supports the cache=never mode with --nocache, but it does not support the equivalent of cache=auto mode. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2024-12-30Merge pull request #1081 from bsbernd/so-version-abi-compatBernd Schubert-528/+645
Increase the .so version, but also change back to previous ABI
2024-12-30Increase .so version to 4Bernd Schubert-1/+1
We have multiple ABI breakages - increase the .so version. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30Convert FUSE_CAP defines to enum fuse_capabilityBernd Schubert-315/+322
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30Add 64-bit conn::{capable,want}_ext fieldsBernd Schubert-142/+216
The previous fields are left for ABI compatibility, although it is not beautiful to add that complexity when we have to increase the so-version as we had ABI breakage anyway. example/printcap is simplified to use an array, as every line would have needed to be modified anyway. Missing 'FUSE_CAP_PASSTHROUGH' was added. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30fuse_lowlevel.c: define FUSE_MAXOP as CUSE_INITBernd Schubert-1/+6
We don't want FUSE_MAXOP calculated at compilation time, as the ABI limit is CUSE_INIT - better use that value directly. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30Use uint32_t for libfuse_versionBernd Schubert-4/+4
Should be used internally only, but is still in a common file - we better use arch independent values. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30struct fuse_file_info extensionBernd Schubert-1/+17
Add a flags and reserved fields to struct fuse_file_info and add a static assert on the size. Also add another static assert for 'struct fuse_conn_info' Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30Use single bit for struct fuse_file_info::no_interruptBernd Schubert-1/+4
Now that we know the exact size of the integer we can use a single bit and reserve the other bits. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30Use (u)int32_t for struct fuse_conn_infoBernd Schubert-16/+16
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30Add padding3 in struct fuse_file_infoBernd Schubert-0/+1
pahole was showing a 4 byte hole - add another padding to fill that hole. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30Use (u)int32_t for struct fuse_file_infoBernd Schubert-10/+10
Enforce 32 bit integers for #struct fuse_file_info'. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30Use (u)int32_t for struct fuse_config and extend the structBernd Schubert-24/+34
Enforce 32-bit integers for struct fuse_config and add future ABI fields to that struct. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30Restore compat ABI in 'struct fuse_config'Bernd Schubert-8/+8
This fixes commit dad15aee26835 "Add no_rofd_flush mount option" and restores the ABI by moving the no_rofd_flush field. Given that there were already several releases with this commit we will still need an so version bump. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-30Restore compat ABI in 'struct fuse_file_info'Bernd Schubert-19/+20
This fixes commit a5eb7f2 "Enable parallel direct writes on the same file" and restores the ABI by moving the parallel_direct_writes bit. Given that there were already several releases with this commit we will still need an so version bump. Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
2024-12-28build(deps): bump github/codeql-action from 3.27.9 to 3.28.0dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.9 to 3.28.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/df409f7d9260372bd5f19e5b04e83cb3c43714ae...48ab28a6f5dbc2a99bf1e0131198dd8f1df78169) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2024-12-18Rename _int to _internalBernd Schubert-16/+20
_int can be confused with 'integer'
2024-12-18Allow to have page aligned writesBernd Schubert-41/+103
Read/writes IOs should be page aligned as fuse server might need to copy data to another buffer otherwise in order to fulfill network or device storage requirements. Simple reproducer is example/passthrough* and opening a file with O_DIRECT - without this change writing to that file failed with -EINVAL if the underlying file system was using ext4 (for passthrough_hp the 'passthrough' feature has to be disabled). The mis-alignment from fuse kernel is not ideal, but we can handle it by allocation one page more than needed and then using a buffer that is set up to compensate for kernel misalignment. This also only set se->buf_reallocable to true when called by a libfuse internal caller - we do not know what external callers are doing with the buffer - update to commit 0e0f43b79b9b
2024-12-17tests: Add debug messages to some tests and umountBernd Schubert-16/+97
On my nfs mount the tests were hanging and it was impossible to diagnoze what is actually the issue. Also get rid of 'looseversion' python package dependency, as that package is not in ubuntu - add a handcode kernel version parser.
2024-12-16build(deps): bump github/codeql-action from 3.27.5 to 3.27.9dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.5 to 3.27.9. - [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/f09c1c0a94de965c15400f5634aa42fac8fb8f88...df409f7d9260372bd5f19e5b04e83cb3c43714ae) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2024-12-13examples: Add memfs_ll.ccBernd Schubert-1/+1160
This is an initial implementation and quickly hacked together within a few hours - issues expected. This also increase to C++17 as memfs_ll makes use of more recent features. Background to create this was actually to be able to test large file names (3 * 1024B), which couldn't be achieved with passthrough file system as non of the underlying file systems seems to support that. Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2024-11-27support FUSE_TMPFILE in the low level APIHorst Birthelmer-19/+311
Note that name hashes and using paths as parameters makes it very hard to support anonymous files in the high level API. Known Issues: - tests have to bail out when O_TMPFILE is not supported. This will always be the case with high level passthrough implementations. - test_create_and_link_tmpfile has to be skipped due to unidentified problems with github runner
2024-11-26build(deps): bump github/codeql-action from 3.27.4 to 3.27.5dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.4 to 3.27.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/ea9e4e37992a54ee68a9622e985e60c8e8f12d9f...f09c1c0a94de965c15400f5634aa42fac8fb8f88) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21Fix alignment of allocation in fuse_reply_createVladimir Serbinenko-1/+2
When allocating as an array of char only alignment of 1 is guaranteed but the structure needs an alignment of 8. Specify alignment explicitly
2024-11-21Reallocate fuse_session buffer transparently for extended max writesJoanne Koong-31/+41
A previous PR supported extended max writes (eg write requests larger than 1 MB) by initializing the fuse session buffer size to use the max_pages_limit set in /proc/sys/fs/fuse. However, this is a huge problem for machines where multiple fuse servers may be running but only one server needs large writes. In this case, a lot of memory will be wasted and will lead to OOM issues. This PR does a reallocation of the session buffer transparently if the server set "se->conn.max_write" to a value larger than 1 MiB. This is only for buffers that are "owned" by libfuse - if the server wishes to provide its own allocated buffer for receiving/processing requests, then it should ensure that buffer is allocated to the proper size from the start. Local testing showed: echo 65535 | sudo tee /proc/sys/fs/fuse/max_pages_limit dd if=/dev/urandom of=hello_file bs=6M count=2 write requests: write request size is 5242880 write request size is 1048576 write request size is 5242880 write request size is 1048576
2024-11-20build(deps): bump github/codeql-action from 3.27.1 to 3.27.4dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.1 to 3.27.4. - [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/4f3212b61783c3c68e8309a0f18a699764811cda...ea9e4e37992a54ee68a9622e985e60c8e8f12d9f) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18Use fuse_session_{receive/process}_buf() instead of _int versionJoanne Koong-4/+4
No functional changes.
2024-11-13Add FUSE_CAP_NO_EXPORT and use it in passthrough_hpBernd Schubert-1/+25
This should stop some more xfstest test failures.
2024-11-13Add fuse_set_feature_flag() / fuse_unset_feature_flagBernd Schubert-20/+41
Simplify setting feature flags a bit by adding a helper function. Also move the check for valid flags into a funtion we can re-use in a later patch.
2024-11-13build(deps): bump github/codeql-action from 3.27.0 to 3.27.1dependabot[bot]-2/+2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.0 to 3.27.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/662472033e021d55d94146f66f6058822b0b39fd...4f3212b61783c3c68e8309a0f18a699764811cda) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30Correct arg documentation for FUSE_READLINKBernd Schubert-1/+1
It does not have an in-argument.