It was never called and only produced an unused-function warning.
Drop the includes only it used and a duplicate fs_clonepath.hpp
include, and fix a typo in a comment.
- getfattr prints the key it was asked for, and the create policies
the example sets and shows are real ones (pfrd, epmfs), not the
nonexistent prfd.
- rpmbuild names its output mergerfs-<version>-1.<dist>.<arch>.rpm,
and the static release archive includes the version in its name.
- --nosignature applies to every distribution that enforces RPM
signatures, not only Fedora 45.
mergerfs stores nothing on its branches by default, but the opt-in
link-exdev and rename-exdev fallbacks create .mergerfs_symlink_exdev/
and .mergerfs_rename_exdev/ at branch roots, and files renamed by
rename-exdev live inside the latter. Say so where the downsides and
migration pages promise that mergerfs can be removed, or the pool
retired, without touching the data.
Keep the mechanism and the recommendations, but drop the promises of
exact runtime messages, log levels and probe results, which vary by
container runtime version. Give the ausearch and sesearch checks
instead. The downsides page now says to omit :z and :Z on mergerfs
bind mounts.
- install-build-pkgs runs as root and handed its compiler choice to
build-mergerfs through /tmp/build-env, which another user could
create before root writes it. Use /etc/mergerfs-build-env, written
to a temporary name, made mode 0644 and renamed into place, so a
normal user can source it regardless of root's umask and never reads
it half written.
- The C++20 probe compiles in a private temporary directory instead of
at fixed names in /tmp.
- yum hosts also consider an already installed devtoolset, which "yum
list available" omits.
- Document sourcing the handoff file before make deb.
The mergerfs-fusermount and mount.mergerfs rules ignored CPPFLAGS, and
the fusermount rule also ignored LDFLAGS, so the setuid helper was
built without the distribution's _FORTIFY_SOURCE and relro/now
hardening. Use both in both rules.
- The RELEASE=1 profile replaced 2.42.0's NDEBUG=1 one, but the
static archives and the container image still build with NDEBUG=1,
which therefore selected the debug profile: -O0 -g3 with assertions
on. Both Makefiles accept NDEBUG=1 again, as -O3 -DNDEBUG, and the
debug profile defines DEBUG. The vendored libfuse follows the same
profile as mergerfs.
- make release first removes the objects, binaries and stamp under
build/ and cleans vendored/libfuse, because make only compares
timestamps: objects from an earlier debug build were otherwise
linked into the release binary unchanged. Packages and build reports
in build/pkgs are kept; TEST_release_pkg_preservation checks both.
- make release also builds preload.so. It takes the release defines
through its own PRELOAD_CPPFLAGS: the global CPPFLAGS add
_FILE_OFFSET_BITS=64, which would hide its unsuffixed
open/openat/fopen/creat interposers.
- mergerfs.spec builds the release target, as debian/rules does. The
distribution's CFLAGS, CXXFLAGS and LDFLAGS still apply.
- The release driver mounts the repository with ":ro,z", not ":ro:z",
which Podman read as an extra field instead of a mount option.
TEST_release_metadata runs the driver against a fake podman and
checks the volume argument and the build report.
- Remove release-installer: build-release has no installer target.
- make help printed a literal "\n" where /bin/sh is bash. Match the
build.md transcript to its output and document the profiles.
Performance: static archives and the container image go from -O0 with
assertions back to optimized builds, now -O3 -DNDEBUG (2.42.0: -O2
-DNDEBUG). RPM packages keep the distribution's -O2 and no longer
evaluate assertions. A plain make is unoptimized, as before.
Once a file or directory is removed (unlink, rmdir, rename over it)
libfuse has no path for its node and falls back to the fh based
getattr/setattr/statx with fh=0. If mergerfs had no open file for the
node (a directory, an O_PATH fd, a cwd, or a dentry resolved just
before the removal) it returned EBADF. The kernel sends GETATTR for
such nodes in the permission checks of a path walk, so lstat() of a
directory, or of a path below it, could fail with EBADF while rm -rf
removed it. Two rm -rf at once, one on a directory and one on the
directory above it, met it when one removed a directory the other
still had open: the other's unlinkat() through its dirfd failed, rm
reported "Bad file descriptor" and left entries behind.
mergerfs now returns ENOENT. That is what a local filesystem gives
*at() calls in a removed directory, and what rm -f ignores. ESTALE
would make the kernel redo a path based lookup, which helps a stat
racing a rename over the path. But a call through a dirfd or cwd of a
removed directory meets the same node again and fails anyway, and the
concurrent rm -rf still did. Calls on the removed object itself, which
succeed on a local filesystem, get ENOENT instead of EBADF.
TEST_rm_rf_concurrent runs the two cases reported. The rm -rf one is
a narrow race; TEST_use_dirfd_after_rmdir covers its cause without
one, with cache.attr=0 so the kernel sends GETATTR every time.
See #1693.
- DEFERs run in reverse order, so workers posted the semaphore before
setting exited; the main loop could wake, see exited == 0 and wait
again. With one read thread mergerfs then stayed running after
unmount until signaled.
- Set exited and post in a single DEFER, in that order.
Enable parallel Debian package builds through debhelper, remove Debian 11 release targets, and select the installed GCC Toolset activation script on Rocky Linux 10 while preserving older layouts. Update the build documentation.
- Restore source permissions after ownership to preserve setgid and clear unwanted inherited mode bits.
- Add regression coverage for directory modes, group inheritance, and existing destination directories.
- Update the branch configuration test to use the current API.
- Document metadata preservation when cloning directory paths.
- Stop parent traversal after evaluating the empty relative root.
- Preserve filtering errors, parent fallback, and closest-path selection.
- Cover all four MSP policies with rejection and fallback regressions.
- Document errors when traversal exhausts the branch root.
- Add a top-level Migration page covering both migration directions.
- Explain filesystem reuse, parity constraints, partition requirements,
and unlocking encrypted Unraid disks.
- Describe intact ZFS pool imports and subdirectory branch reuse,
distinguishing them from cases requiring a data copy.
- Add navigation and link the guide from the Unraid comparison.
* Add: a comprehensive downsides FAQ with mitigations and practical
priorities.
* Document: mergerfs-webui and link it from setup and configuration
guides.
* Replace: obsolete mergerfs.fsck references with fsck.mergerfs
guidance.
Describe why mergerfs does not aggregate branch performance like
RAID/ZFS (whose aggregate throughput is also capped by shared
interconnects) and instead provides independent per-branch
performance: best case A+B+C across concurrent streams, worst case
single-stream limited to one branch's speed.
- Store cloned read-worker fds on fuse_session and close them there.
- Set up clone fallback through session helpers used by the loop.
- Carry per-request fds through receive, process, and reply paths.
Tests show significant performance increases in highly concurrent
workloads on a high core count system. Upto 15% better on reads and
27% on writes.
- Expose the ioprio enabled flag as an atomic for relaxed inline checks
- Inline SetFrom construction so disabled read/write paths avoid a function call
- Move priority application into a slow helper used only when ioprio is enabled
- Guard fuse_cfg_t log file and filepath shared pointers with a shared mutex
- Replace atomic shared pointer loads and stores with shared and unique locks
- Replace atomic shared pointer loads/stores with shared/unique locking.
- Store the configured readdir mode directly as std::string.
- Copy the active ReadDir implementation under lock before invoking it.
- Use relaxed increment under the map bucket lock when duplicating file handles.
- Use acq_rel decrement when releasing and checking for final references.
- Load moved ref_count with relaxed ordering during map insertion.
- Explain that the mutex is per readdir call.
- Document that only dirent deduplication and list append are serialized.
- Clarify that per-branch opendir and getdents64 work runs outside the critical section.
- Replace the per-file Mutex with std::shared_mutex for shared write access.
- Run direct and cached writes under a shared lock while the fd is stable.
- Retry failed writes under a unique lock before move-on-ENOSPC relocation.
- Add helpers that release path locks and update node state under f.lock.
- Update getattr and setattr stat-cache invalidation while preserving ESTALE handling.
- Rework create, open, tmpfile, and set_path_info to mutate lookup/open state under the shared lock.
- Document the lock/unlock pair as an acquire/release barrier.
- Explain that releasedir waits for in-flight readdir calls before destroy/free.
- Warn against removing the synchronization despite it not being a critical section.
Important changes:
- Switch mergerfs and vendored libfuse Makefiles to -std=c++20.
- Select the latest available GCC/G++ or toolset in container builds.
- Verify compiler C++20 support during package installation.
- Fix dynamic SysLog formatting for fmt C++20 checks.
- Add mergerfs_mount() context manager in posix_parity.py that creates
temporary branch dirs in tests/.test_tmp/, mounts an ephemeral mergerfs
instance, and cleans up after use.
- Add find_mergerfs(), find_fusermount(), mount_mergerfs(), unmount_mergerfs()
helpers.
- Update run-tests to invoke each TEST_* script without a mountpoint arg.
- Update README.md to document the new `python3 tests/run-tests` invocation.
- Fix 44 tests to use mergerfs_mount() instead of expecting a pre-mounted path.
- Add tempfile import to 10 tests that were missing it.
- Fix TEST_mount_lifecycle to use mergerfs_mount() context manager.
- Fix TEST_posix_tmpfile missing join import.
- Fix TEST_cfg_xattr_modes error message framing (no "(known bug)").
- Fix TEST_posix_copy_file_range: loop-copy full size, compare st_size and
SHA256 hash; add NativeTmp for space management; route native temp to
tests/.test_tmp/ to avoid ENOSPC on /tmp.
- Fix TEST_posix_getattr_fgetattr: st_cmp skips st_size for dirs; add
compare_ino param for safe inode comparison when inodecalc=passthrough.
- Fix TEST_unlink_rename, TEST_use_* tests: namespace cleanup, consistent
variable naming, None check for cmpfunc.
- Fix TEST_readlink_semantics: remove type annotations to support older
Python; wrap in mergerfs_mount() try/except.
- Add flush=True to run-tests print so test names show immediately.