Files
Antonio S. MusumeciandClaude Sonnet 5 8eed256747 Restore splice zero-copy I/O as runtime options
Reinstate the splice read/write/move paths removed in 84592a9f, now
gated behind runtime options with negotiated pipe sizing and fallback
logging.

- Transport: msgbuf-piped splice receive, fd-referenced splice reply
  (vmsplice + splice), splice-move pipe-bounce, and restored
  fuse_buf_copy/fuse_buf_flags plumbing for copy fallbacks
- Negotiation: new pipe-max-size option (auto-raised at INIT when
  possible; the sysctl read/write is factored into src/pipe_max_size.cpp
  so fuse_init.cpp and option_parser.cpp share one implementation);
  fuse-msg-size clamped to what the pipe can hold; splice is disabled
  at INIT with a warning if the sysctl can't fit even the minimum,
  retracting the FUSE_CAP_SPLICE_* bits already advertised to the
  kernel in that case
- Read replies and splice-move are gated at 128 KiB (below that the
  syscalls cost more than the copy they avoid); every fallback path
  degrades to the copy path and logs once per process via SysLog
- msgbuf pipe cache is process-global and mutex-guarded (mutex_lockguard)
  so pipes can move between read and worker threads under
  process-thread mode
- API simplified after review: collapsed the three per-axis options
  (splice-read/write/move) into a single splice boolean (default on);
  no-splice-read/write/move and the bare splice-read/write/move
  spellings stay registered as accepted no-ops so existing mount
  options don't fail the mount, but they do NOT alter the splice
  knob - upgraders with no-splice-* in their config get splice
  enabled and must set splice=false explicitly (see
  deprecated_options.md)
- Fixed several correctness issues found in parallel review: a
  dropped write_buf registration that silently corrupted writes, a
  dirty-pipe reuse bug in msgbuf_free, an iov double-send in
  fuse_reply_data's splice-move fallback, and pipe-capacity math that
  assumed a 4096-byte page size
- Modernized the transport/negotiation code to this codebase's C++
  style: RAII (unique_ptr/DEFER) instead of malloc/free and manual fd
  close(), std::from_chars/to_chars instead of stoul/snprintf,
  _ReplyPipe's pipe ops as methods instead of free functions closing
  over a thread_local global, and vendored/libfuse/lib/buffer.cpp (a
  near-verbatim port of upstream's buffer.c) brought in line with the
  rest of the fork
- Documented splice and pipe-max-size options (mkdocs, FAQ,
  deprecated-options list); added tools/bench-splice.sh
- Benchmarked on tmpfs: seq_write +21%, seq_read +52%, small_write
  +5%, small_read +12%; validated with a 1h soak (~271 GiB
  hash-verified I/O, zero integrity failures), a live-mount round-trip
  of I/O above the splice threshold, and the existing unit/smoke
  suites at their pre-existing baseline

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 11:24:16 -04:00

125 lines
3.3 KiB
YAML

site_name: mergerfs
site_description: mergerfs - a featureful union filesystem
site_url: https://trapexit.github.io/mergerfs/
repo_name: mergerfs
repo_url: https://github.com/trapexit/mergerfs
edit_uri: edit/master/mkdocs/docs/
docs_dir: docs
plugins:
- search
- mike
extra:
version:
provider: mike
theme:
name: material
logo: logo.png
favicon: logo.png
features:
- content.action.edit
- content.action.view
- content.code.copy
- content.code.select
- navigation.footer
- navigation.instant
- navigation.instant.prefetch
- navigation.path
- navigation.top
- navigation.tracking
- optimize
- search.share
- search.suggest
- toc.follow
palette:
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to system preference
markdown_extensions:
- footnotes
- pymdownx.highlight:
auto_title: false
linenums_style: pymdownx-inline
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
nav:
- Home: index.md
- QuickStart: quickstart.md
- Installation:
- setup/installation.md
- setup/upgrade.md
- setup/build.md
- Terminology: terminology.md
- Intro to Filesystems: intro_to_filesystems.md
- Config:
- config/options.md
- config/deprecated_options.md
- config/branches.md
- config/branches-mount-timeout.md
- config/functions_categories_policies.md
- config/minfreespace.md
- config/func_readdir.md
- config/rename_and_link.md
- config/moveonenospc.md
- config/cache.md
- config/passthrough.md
- config/readahead.md
- config/inodecalc.md
- config/threads.md
- config/pin-threads.md
- config/proxy-ioprio.md
- config/link-cow.md
- config/fuse-msg-size.md
- config/splice.md
- config/pipe-max-size.md
- config/follow-symlinks.md
- config/link-exdev.md
- config/rename-exdev.md
- config/symlinkify.md
- config/nullrw.md
- config/xattr.md
- config/nfsopenhack.md
- config/statfs.md
- config/flush-on-close.md
- config/export-support.md
- config/kernel-permissions-check.md
- config/lazy-umount-mountpoint.md
- Error Handling and Logging: error_handling_and_logging.md
- Resource Usage: resource_usage.md
- Runtime Interface: runtime_interface.md
- Remote Filesystems: remote_filesystems.md
- Tips and Notes: tips_notes.md
- Known Issues and Bugs: known_issues_bugs.md
- Project Comparisons: project_comparisons.md
- Benchmarking: benchmarking.md
- Performance: performance.md
- Tooling: tooling.md
- Extended Usage Patterns: extended_usage_patterns.md
- FAQ:
- faq/why_isnt_it_working.md
- faq/configuration_and_policies.md
- faq/usage_and_functionality.md
- faq/reliability_and_scalability.md
- faq/compatibility_and_integration.md
- faq/technical_behavior_and_limitations.md
- faq/have_you_considered.md
- faq/limit_drive_spinup.md
- Related Projects: related_projects.md
- Media and Publicity: media_and_publicity.md
- Support: support.md
- Sponsorship and Donations: sponsorship_and_donations.md