Add libfuse 3 support with libfuse 2 fallback - #603
Open
matejk wants to merge 3 commits into
Open
Conversation
This was referenced Jun 11, 2026
matejk
force-pushed
the
fuse3-port
branch
2 times, most recently
from
June 12, 2026 09:35
3068ef8 to
051a223
Compare
matejk
marked this pull request as draft
June 12, 2026 09:40
matejk
force-pushed
the
fuse3-port
branch
3 times, most recently
from
June 12, 2026 10:19
9371bee to
0f4763f
Compare
matejk
marked this pull request as ready for review
June 12, 2026 10:22
This was referenced Jun 12, 2026
Merged
vandelvan
requested changes
Jul 3, 2026
Contributor
Author
vandelvan
approved these changes
Jul 10, 2026
vandelvan
left a comment
Member
There was a problem hiding this comment.
Thank you for your contribution! LGTM
13 tasks
configure prefers fuse3 on Linux and falls back to fuse2; --with-fuse2 forces the libfuse 2 API and stays the default on macOS and the BSDs.
1 MiB requests, -o direct_io and readdirplus. parallel_direct_writes is detected at configure time; libfuse 3.14 lacks it.
FUSE_DARWIN_ENABLE_EXTENSIONS=0 selects the upstream operation signatures that macFUSE's libfuse 3 also exports.
matejk
force-pushed
the
fuse3-port
branch
2 times, most recently
from
August 17, 2026 20:28
679907e to
f4400f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port of LTFS to libfuse 3 with a compile-time libfuse 2 fallback, plus the FUSE 3 performance features. Based on the v2.4.8.4 release on
main, 3 commits (the port, the performance features, macOS support). The test suite, the bug fixes found during this work, and the CMake build are separate independent PRs.FUSE 3 support
--with-fuse2forces the legacy API (still the default on macOS and the BSDs).getattr/truncateabsorb the handle variants,chmod/utimensuse the file handle when the path is NULL (nullpath_ok),renamehandlesRENAME_NOREPLACE/RENAME_EXCHANGE,use_ino/hard_remove/nullpath_okmove intofuse_config, andFUSE_CAP_ASYNC_READis cleared to keep tape reads ordered (-o sync_readno longer exists).fuse_file_info.parallel_direct_writesis feature-detected (the field appeared in libfuse 3.15; version checks broke on ubuntu-24.04's 3.14).FUSE_DARWIN_ENABLE_EXTENSIONS=0; macOS keeps fuse2 as its default.Performance
-o max_write=N): measured 1 MiB writes and O_DIRECT reads reaching the daemon, vs 128 KiB on fuse2.-o direct_io: all I/O bypasses the kernel page cache; ~70 % higher sequential write throughput on the file backend and a flat page cache during large streaming jobs.ls -lover 100 files needs 2 getattr requests instead of 102 (effective with libfuse >= 3.17).Relationship to the other PRs
Verification
With #607 and #611 merged alongside: all 14 integration tests pass with fuse3 and fuse2, via
make checkandctest, against libfuse 3.14 and 3.17; zero compiler warnings at-Wall -Wextra; macOS compile-verified for both APIs against the macFUSE 5.2 SDK.Issues
pthread_yieldhalf is in Build and CLI fixes #608).