Commit graph

5 commits

Author SHA1 Message Date
Antonio SJ Musumeci
8cc6be6ff2 fix: make enum, minfreespace and process-name options safe to change
- Options set through the .mergerfs xattr are written while request
  threads read them, with no synchronization. That is a data race; on
  32-bit targets a request could see half of a new 64-bit minfreespace.
- Store the default minfreespace as std::atomic<u64> with relaxed
  loads and stores. Per-branch values are unchanged.
- Store every enum option (rename-exdev, xattr, cache.files, statfs,
  nfsopenhack, follow-symlinks and the rest) atomically. Copies take a
  snapshot.
- getxattr, setxattr and removexattr read the xattr option once per
  request instead of twice.
- cache.files.process-names was cleared and refilled in place while
  open and create looked names up in it, which could walk freed tree
  nodes. Build the new set aside and swap it in under a lock that
  lookups share.
- Other options (booleans, numbers and strings) are still plain values;
  this covers only the ones above.
2026-11-29 23:11:03 -05:00
Antonio SJ Musumeci
3a45be4cd8 Rework string utils, more test cases 2026-03-24 21:13:34 -04:00
Antonio SJ Musumeci
a5a6c892b9 Update copyright headers 2026-03-02 01:09:16 -05:00
trapexit
6ac7f389c5
Misc changes (#1513)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run
* Start moving to string_view where possible
* Rework readdir object to use atomic load/store
2025-08-21 22:42:58 -05:00
Antonio SJ Musumeci
9effeb6869 Add "per-process" file caching feature
Allows chosing page caching based on process name.
2023-02-18 01:16:36 -05:00