Misc updates of docs (#1518)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled

This commit is contained in:
trapexit 2025-09-01 21:58:58 -04:00 • committed by GitHub
parent 071af2e516
commit 5becb334cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 48 additions and 24 deletions

View file

@ -11,7 +11,8 @@ works for mergerfs itself. Not the underlying filesystems.
* `cache.files=full`: Enables page caching. Files are cached across
opens.
* `cache.files=auto-full`: Enables page caching. Files are cached
across opens if mtime and size are unchanged since previous open.
across opens if mtime and size are unchanged since previous
open. Cache is dropped if mtime or size change on open.
* `cache.files=per-process`: Enable page caching (equivalent to
`cache.files=partial`) only for processes whose 'comm' name matches
one of the values defined in cache.files.process-names. If the name
@ -40,6 +41,11 @@ transparently enable page caching when mmap is requested. This means
it should be safe to set `cache.files=off`. However, on Linux v6.5 and
below you will need to configure `cache.files` as you need.
If [passthrough](passthrough.md) is enabled so must be page
caching. mergerfs will set `cache.files=auto-full` if `passthrough` is
enabled. And when using `passthrough` the there is no double page
caching since it is in fact passing through the IO.
[^1]: This is not unique to mergerfs and affects all FUSE
filesystems. It is something that the FUSE community hopes to

View file

@ -3,10 +3,10 @@
* default: `off`
* arguments:
* `off`: Passthrough is never enabled.
* `ro`: Only enable passthrough when file opened for reading only.
* `wo`: Only enable passthrough when file opened for writing only.
* `rw`: Enable passthrough when file opened for reading, writing,
or both.
* `ro`: Only enable IO passthrough when file opened for reading only.
* `wo`: Only enable IO passthrough when file opened for writing only.
* `rw`: Enable IO passthrough when file opened for reading, writing,
or both.
In [Linux 6.9](https://kernelnewbies.org/Linux_6.9#Faster_FUSE_I.2FO)
a IO passthrough feature was added to FUSE. Typically `mergerfs` has
@ -57,7 +57,7 @@ file opened. However, at the moment there is no use case for picking
and choosing which to enable outside `cache.files=per-process` (which
is largely unnecessary on Linux v6.6 and above. See
[direct-io-allow-mmap](options.md)) If such a use case arises please
reach out to the author to discuss.
[reach out to the author](../support.md) to discuss.
Unlike [preload.so](../tooling.md#preloadso), `passthrough` will work for
any software interacting with `mergerfs`. However, `passthrough`
@ -67,10 +67,18 @@ requires Linux v6.9 or above to work.
`root` as currently only `root` is allowed to leverage the kernel
feature.
**NOTE:** If a file has been opened and passthrough enabled, while that
file is open, if another open request is made `mergerfs` must also
enable `passthrough` for the second open request. This is a limitation
of how the passthrough feature works.
**NOTE:** If a file has been opened and `passthrough` enabled, while
that file is open, if another open request is made `mergerfs` must
also enable `passthrough` for the second open request. This is a
limitation of how the passthrough feature works. Though there is no
known usecase where this is useful.
**NOTE:** In order to add `passthrough` feature to `mergerfs` it was
necessary to remove the "feature" where mergerfs could open the same
file on different branches. Such as using `func.open=rand` and having
multiple files at the same relative path across different
branches. This "feature" was very very rarely used and it was
impossible to support `passthrough` without changing the behavior.
## Alternatives