Commit graph

112 commits

Author SHA1 Message Date
Antonio S. Musumeci
6d9b997e5d docs: correct read-thread-count in the options list
- read-thread-count=0 was documented as the number of logical cores.
  It is capped at 8, or becomes 2 read threads when process-thread-count
  is enabled too, as threads.md says.
- Drop the sentence that read-thread-count=-1 with process-thread-count
  picks reasonable values. -1 follows the negative rule like any other
  negative count: the core count divided by 1, up to the 64 limit. Only
  0 is resolved specially.
- Point at threads.md for how the two settings combine.
2026-11-22 08:38:40 -05:00
Antonio S. Musumeci
898ad5992d fix: keep failed statvfs results in the cache and track entry validity
- A new entry was told apart from a fresh one only by its time of 0.
  With a timeout at least the current time in seconds, such as
  cache.statfs=4294967295, a new entry looked fresh before statvfs
  had run, so the zeroed struct was returned as success: every branch
  reported no free space and every create failed with ENOSPC, and a
  nonexistent path succeeded. 3735d721 applies cache.statfs from the
  mount options, which made it reachable from fstab. Give the entry a
  valid flag set by the first statvfs.
- 5e74822f stopped caching a failure as a success by retrying it on
  every call, under the exclusive lock. With a branch that fails
  slowly, such as an unreachable network mount, each caller then
  waited for its own failure one after the other: eight callers took
  2.4s where 2.42.2 took 0.3s. Keep the failure, as an error, for the
  timeout like a success. It is still never returned as zeroed space.
- Read the clock again once the lock is held, so a caller that waited
  doesn't compute a negative age against the entry another refreshed.
- Tests: a failure is kept until the timeout, and timeouts of
  4294967295 and UINT64_MAX still return real values and errors. Both
  fail without this change.

Measure age with a steady clock, starting when statvfs returns. Even a
refresh slower than the configured timeout can be shared by callers
that waited for it; wall-clock adjustments cannot extend its lifetime.
2026-11-22 08:28:48 -05:00
Antonio S. Musumeci
64d3af02a3 fix: return the error, not a short count, for page cache flushes
- 072b07b6 made a write that fails with ENOSPC after part of it landed
  return the bytes written. The kernel issues writes to flush its page
  cache (cache.writeback, dirty mmap pages) with the writepage flag
  and ignores the size in the reply, then drops the pages. The short
  count lost the rest of the data and hid the error: write, fsync,
  msync and close all succeeded with half the data on disk, where
  2.42.2 returned ENOSPC from fsync or msync.
- Keep the short count for ordinary writes, which the kernel does
  handle, and return the error when the request has writepage set.
- TEST_movefile_enospc covers a writeback flush and an mmap msync with
  moveonenospc=false; both fail without this change. Note the
  exception in moveonenospc.md.

Initialize the flush-test error list before the first I/O operation so
an unexpected error propagates and the descriptor is still closed.
Use the mapping as a context manager for the same reason.
2026-11-22 08:27:04 -05:00
Antonio S. Musumeci
bc7b7ffeae fix: report a short write when ENOSPC recovery fails after a prefix
- 78a67fd0 kept the bytes written before ENOSPC when the move worked.
  When it didn't (moveonenospc off, no branch to move to, the move or
  the retry failing, or a non-ENOSPC error), write still returned the
  error and dropped the count, though those bytes were on disk. An
  O_APPEND writer that retried the whole buffer duplicated them.
- Return the bytes written as a short write whenever some reached the
  file, as a local filesystem does. A write that wrote nothing still
  returns the error.
- TEST_movefile_enospc checks it with moveonenospc=false and a write
  bigger than the space left. Document it in moveonenospc.md.
2026-11-22 01:27:22 -05:00
Antonio S. Musumeci
48f26f3731 docs: correct func.readdir counts and the queue depth of 0
- func.readdir's cor and cosr rows said a negative thread count is the
  core count divided by it. The parser only accepts digits, so a
  negative count is rejected as invalid. Say what 0 does instead: the
  core count, at most 8 threads, and a queue depth of 2 per thread.
- process-thread-queue-depth said 0 makes the depth the process thread
  count. It sets the per-thread depth to 2, as threads.md says.
2026-11-22 01:25:13 -05:00
Antonio S. Musumeci
cd0679b01f fix: leave the source branch out before moveonenospc picks a branch
- 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.
2026-11-22 01:24:45 -05:00
Antonio SJ Musumeci
db9e991ebd fix: saturate the process thread queue depth instead of overflowing
- process-thread-queue-depth is multiplied by the process thread
  count. A large depth overflowed the int, e.g.
  process-thread-queue-depth=1073741824 with 2 process threads, which
  is undefined behaviour.
- Cap the product at INT_MAX. The queue only counts free slots, so a
  depth that large is unbounded in practice, as asked for.
2026-11-21 18:12:38 -05:00
Antonio SJ Musumeci
127c2e6238 fix: cap thread pools at 64 and warn when clamped
- Limit read-thread-count, process-thread-count and the cor/cosr pool
  size in func.readdir to 64 threads per pool. Apply the cap after
  resolving automatic and CPU-divided counts; keep disabled process
  pools disabled and preserve the configured strings.
- Log a syslog warning identifying the setting and limit when clamped.
  For readdir, warn only when applying a valid concurrent policy,
  not during validation.
- Document the fixed cap and warning behavior. Queue depths retain
  their separate limits and use the clamped thread count.
- Resolve negative FUSE counts without overflowing on INT_MIN.

Document that both readdir inputs must fit in int and that a queue
depth whose product with the resolved thread count exceeds INT_MAX
is rejected, not clamped.
2026-11-21 17:48:28 -05:00
Antonio SJ Musumeci
e5a4f72c4d fix: restore the mode when an nfsopenhack open fails
- nfsopenhack adds S_IWUSR|S_IWGRP to a read-only file so the open
  can succeed, and resets the mode on the new fd. When the open still
  failed, the write bits stayed on the file.
- Pin the inode before changing its permissions. Use that reference for
  the temporary mode, retry and restoration, so a concurrent rename
  cannot apply the original mode to an unrelated replacement.
2026-11-21 14:53:55 -05:00
Antonio SJ Musumeci
ecb4de5bc0 Fix branch snapshot lifetime in EXDEV link fallback 2026-11-06 12:10:05 -06:00
Antonio SJ Musumeci
78a67fd066 fix: preserve partial append progress during ENOSPC recovery 2026-11-06 11:24:49 -06:00
Antonio SJ Musumeci
2513d3c067 Cap getdents64 requests at 128 KiB for virtiofs compatibility 2026-11-05 16:05:51 -06:00
Antonio SJ Musumeci
bdfbedad8b Fix release builds and drop Debian 11 targets
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.
2026-11-05 15:02:42 -06:00
Antonio SJ Musumeci
74eade91f5 Preserve directory modes when cloning paths across branches
- 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.
2026-11-04 19:25:10 -06:00
Antonio SJ Musumeci
5d5d7af90b Add Fedora 45 and Ubuntu 26.10 build targets 2026-11-02 18:57:58 -06:00
Antonio SJ Musumeci
b10fb10590 fix: preserve source ownership in EXDEV symlink fallbacks 2026-11-01 21:11:04 -06:00
Antonio SJ Musumeci
7b7e96bbc5 fix: initialize EXDEV rename staging for root sources 2026-11-01 21:11:04 -06:00
Antonio SJ Musumeci
3d81e24f32 fix: keep EXDEV rename symlink targets relative 2026-11-01 21:11:04 -06:00
Antonio SJ Musumeci
28d809f2f8 Fix MSP create policy hangs when no branches qualify
- 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.
2026-11-01 21:11:04 -06:00
Antonio SJ Musumeci
8e87bcbff2 docs: Add Unraid migration guidance for mergerfs
- 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.
2026-10-03 16:52:25 -05:00
Antonio SJ Musumeci
fcd7527c9d docs: document mergerfs tradeoffs and web UI management
* 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.
2026-10-01 20:14:52 -04:00
Antonio SJ Musumeci
83d1630f55 docs: rework and expand project comparisons 2026-09-22 14:50:47 -05:00
Antonio SJ Musumeci
cfb925e5ae docs: clarify branch resolution and mount ordering 2026-09-21 13:46:38 -05:00
Antonio SJ Musumeci
515b0549ef docs/performance: explain mergerfs IO performance vs RAID
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.
2026-09-05 16:00:43 -04:00
natalefalco
8ea47df13e Include Docker Compose setup for mergerfs
Added Docker Compose configuration for running mergerfs.
2026-07-31 08:13:59 -05:00
shyney7
42ab831d97 docs/setup: link install :z example to SELinux FAQ 2026-05-17 10:14:21 -05:00
shyney7
89b4046d11 docs/faq: add SELinux relabeling entry 2026-05-17 10:14:21 -05:00
Antonio SJ Musumeci
99835a0178 Document advisory locking limitation and update deprecated options
- Add documentation explaining that advisory file locking is not supported

- Add remember-nodes to deprecated options mapping

- Add comment explaining stat_crc32b fingerprint invalidation behavior

- Fix heading level for Host vs Container identity section
2026-05-06 20:49:46 -04:00
Antonio SJ Musumeci
f1034a3ad6 Remove timed node removal 2026-05-06 20:49:46 -04:00
Antonio SJ Musumeci
1a8eb326af Tweak docs on NFS and identity management 2026-04-21 13:20:07 -05:00
Antonio SJ Musumeci
9fb1642e93 Fix docs regarding "noforget" 2026-04-20 23:25:47 -05:00
Antonio SJ Musumeci
9e2e1afafa Update docs on limiting drive spinup
Some checks failed
mkdocs / deploy (push) Has been cancelled
2026-04-06 14:01:20 -05:00
Antonio SJ Musumeci
3b10406f95 Add more details to project comparisons 2026-04-04 02:17:06 -05:00
Antonio SJ Musumeci
ecee84b323 Improve proj comparisons + new SnapRAID details 2026-03-31 19:51:28 -04:00
Antonio SJ Musumeci
b8776d205d Update docs; add nofs, policyfs and greyhole
Some checks failed
mkdocs / deploy (push) Has been cancelled
2026-03-27 22:54:39 -05:00
Antonio SJ Musumeci
2ea6290e4b Update limiting drive spinup doc
Some checks failed
mkdocs / deploy (push) Has been cancelled
2026-03-04 11:05:55 -05:00
trapexit
b4239495a0
Update docs for logging changes + new video (#1618)
Some checks failed
mkdocs / deploy (push) Has been cancelled
2026-02-12 23:21:43 -06:00
trapexit
3222de6c9c
Fixup debug output (#1617) 2026-02-12 22:50:38 -06:00
trapexit
a47842e2f8
Add MOS to projects and update misc links (#1614)
Some checks failed
mkdocs / deploy (push) Has been cancelled
2026-01-27 11:25:32 -06:00
trapexit
f769d7474b
Add new links to media docs (#1613)
Some checks are pending
mkdocs / deploy (push) Waiting to run
2026-01-27 07:59:38 -06:00
trapexit
2ae57642f4
Misc documentation updates (#1612) 2026-01-27 07:00:22 -06:00
trapexit
965e26989c
Misc documentation updates (#1605)
Some checks failed
mkdocs / deploy (push) Has been cancelled
2025-12-23 23:25:39 -06:00
François-Xavier Payet
22df87c86a
Add LUP policy (#1601)
Some checks are pending
mkdocs / deploy (push) Waiting to run
2025-12-14 00:36:12 -06:00
trapexit
72fb6e4aba
Update submitting bug reports, improve collect-info (#1598)
Some checks failed
mkdocs / deploy (push) Has been cancelled
2025-12-06 13:55:14 -06:00
trapexit
9b046d9a34
Rework credential handling to support chroot & idmap (#1595)
Some checks are pending
mkdocs / deploy (push) Waiting to run
Run in an elevated credential mode (root) and let the kernel manage
entitlements. Will result in slightly different behavior but should
not be noticed by most.
2025-12-05 21:03:48 -06:00
trapexit
411d181473
Add qbittorrent specific section of known issues (#1591) 2025-11-25 23:14:20 -06:00
trapexit
f7e86d90ce
Add FAQ about lack of create policies about file size (#1578)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run
2025-11-16 23:44:24 -06:00
trapexit
3bacaa6f7f
Add lazy-umount-mountpoint page and mount -a FAQ (#1573) 2025-11-12 12:19:00 -06:00
trapexit
b6e1a08aef
Add link to container image repo (#1570)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run
2025-11-11 19:38:18 -06:00
trapexit
47bd4259b8
Add container image details (#1569)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled
2025-11-08 20:28:10 -06:00