- The source branch was dropped from the create policy's result. ff,
mfs, lfs, lus and pfrd return a single branch, so when that branch
was the source nothing was left and the write kept ENOSPC even with
room elsewhere. That happens when the source has free space by
statvfs but still returns ENOSPC or EDQUOT: a quota, exhausted
inodes, full btrfs metadata, or a cached statfs.
- Build the candidate list without the source (matched by device and
inode, as before) and run the policy on that, so it picks another
branch. With no candidate left the move is still refused.
- test_fs_movefile_and_open_same_branch now checks that ff relocates
past a source listed first, by its own path or an alias, and that a
list made only of the source is refused.
Refuse relocation if a duplicate on another branch could become visible
when the source is removed. Keep non-replacing publication to protect
against a late arrival at the destination. The mounted test checks the
original and duplicate contents, then reopens the file through the pool.
- Setting minfreespace through the .mergerfs xattr wrote the shared
default while request threads read it through each branch, with no
synchronization. That is a data race; on 32-bit targets a request
could see half of the new 64-bit value.
- Store the default as std::atomic<u64> and read and write it with
relaxed loads and stores. Per-branch values are unchanged.
- With cache.statfs=N, statvfs_cache set the entry's timestamp before
calling statvfs. When that call failed, the failure was returned
once and then every caller for the next N seconds got success with
the entry's old or zeroed stats, and create policies chose
branches from them.
- Refresh the entry only when statvfs succeeds. A failure is
returned and retried on the next call.
- tests.cpp checks that a second lookup of a missing path still
fails.
- std::stoi threw std::out_of_range for a concurrency or queue depth
above INT_MAX, e.g. cor:99999999999. Given at mount, mergerfs
aborted. Set at runtime through .mergerfs, the daemon shut down and
the mount went away, or with process-thread-count>0 the request
never got a reply.
- Parse with str::from, which reports the overflow, and reject the
value like any other malformed one.
- Also reject a queue depth whose product with the concurrency
overflows an int, e.g. cor:2147483647:2147483647, instead of
wrapping it.
- tests.cpp covers both.
- moveonenospc copied from the branch stored when the file was opened,
which a move never updates, so a second ENOSPC on the same handle
tried to copy a path that no longer existed and failed with ENOSPC.
- Find the source branch from the fd at the start of each move, as
before e216a81a. findonfs now matches inode as well as device, so
branches on one filesystem are told apart, and tries the stored
branch first. No match leaves the write's ENOSPC in place.
- Drop destinations that are the source directory, matched by device
and inode so another path to it counts. The copy was renamed over
the file and then unlinked, deleting it while the write reported
success. A first move could already pick the source (EDQUOT with
free space); finding the real source let later moves do it too.
With no destination left the write keeps its error.
- TEST_movefile_enospc adds a handle that has to move twice.
tests.cpp covers a move onto the source branch by its own path
and by an alias.
- 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.
- Make the test runner fail on failed tests and report explicit skips
- Strengthen assertions for O_DIRECT, LUP policy, EXDEV fallback, and xattrs
- Fix cleanup and file descriptor handling across test scripts