mergerfs/vendored/libfuse/lib
Antonio SJ Musumeci d679fdd265 fix: validate and cap thread and queue counts
- std::stoi threw std::out_of_range for a func.readdir 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.
- Reject a readdir queue depth whose product with the concurrency
  overflows an int, e.g. cor:2147483647:2147483647, instead of
  wrapping it.
- Limit read-thread-count, process-thread-count and the cor/cosr pool
  size to 64 threads per pool, after resolving automatic and
  CPU-divided counts, and log a warning when clamping. Resolve
  negative FUSE counts without overflowing on INT_MIN, and drop the
  unreachable negative readdir concurrency branch.
- process-thread-queue-depth is multiplied by the process thread count.
  Saturate the product at INT_MAX instead of overflowing.
- Correct the docs: cor/cosr counts accept digits only and 0 means the
  core count, at most 8; a queue depth of 0 means 2 per thread;
  read-thread-count=0 with process-thread-count=0 is 2 read threads
  and max(2, cores - 2) process threads, at most 8; the queue limit is
  depth times process threads, each read thread holding one in-flight
  buffer of its own. Point at threads.md for how the settings combine.
- Document the per-read-thread /dev/fuse clones and their fallback.
- tests.cpp covers the overflow cases.

Performance: default thread counts are unchanged (8 on hosts with 8 or
more cores). Only explicit or CPU-divided counts above 64, which
2.42.0 honored, are reduced.
2026-11-29 23:11:00 -05:00
..
cpu.cpp libfuse: small safety and portability fixes across opt/cpu/fusermount/maintenance_thread 2026-04-18 13:47:23 -05:00
cpu.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
crc32b.cpp Convert vendored/libfuse C sources to C++17 2026-03-24 21:13:34 -04:00
crc32b.h Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
debug.cpp Require C++20-capable build toolchains 2026-05-13 13:55:43 -05:00
format.cpp Move fmtlib to vendored and upgrade to 12.1.0 2026-03-02 01:09:16 -05:00
fuse.cpp refactor: use free_path_and_update_stat in setattr 2026-11-29 23:10:57 -05:00
fuse_cfg.cpp Use shared_mutex for fuse log config 2026-05-14 00:22:06 -04:00
fuse_dirents.cpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_i.hpp Manage cloned /dev/fuse fds in sessions 2026-05-14 20:13:07 -05:00
fuse_loop.cpp fix: validate and cap thread and queue counts 2026-11-29 23:11:00 -05:00
fuse_lowlevel.cpp Manage cloned /dev/fuse fds in sessions 2026-05-14 20:13:07 -05:00
fuse_msgbuf.cpp More aggressive error handing with pagesize queries 2026-03-24 21:13:34 -04:00
fuse_opt.cpp libfuse: small safety and portability fixes across opt/cpu/fusermount/maintenance_thread 2026-04-18 13:47:23 -05:00
fuse_req.cpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
fuse_session.cpp Manage cloned /dev/fuse fds in sessions 2026-05-14 20:13:07 -05:00
fuse_signals.cpp libfuse: use atomic fuse_session pointer in signal handler 2026-04-18 13:47:23 -05:00
helper.cpp Use unmount() on FreeBSD for ENOTCONN umount 2026-05-07 17:49:24 -04:00
maintenance_thread.cpp libfuse: small safety and portability fixes across opt/cpu/fusermount/maintenance_thread 2026-04-18 13:47:23 -05:00
mount.cpp Convert vendored/libfuse C sources to C++17 2026-03-24 21:13:34 -04:00
mount.hpp Convert vendored/libfuse C sources to C++17 2026-03-24 21:13:34 -04:00
mount_bsd.h Convert vendored/libfuse C sources to C++17 2026-03-24 21:13:34 -04:00
mount_generic.h Fallback to fusermount3 where available 2026-03-24 21:13:34 -04:00
mount_util.h replace raw C-strings with std::string in converted libfuse files 2026-03-24 21:13:34 -04:00
node.cpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
node.hpp Remove timed node removal 2026-05-06 20:49:46 -04:00
pin_threads.cpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
pin_threads.hpp Move 3rd party libraries to "vendored" directory 2026-03-02 01:09:16 -05:00
xalloc.hpp libfuse: harden fuse.cpp against NULL nodes; use lock guards; check allocations 2026-04-18 13:47:23 -05:00