Skip to content

feat: opt-in write-back for the mount - #20

Merged
zcsizmadia merged 1 commit into
mainfrom
feat-writeback
Aug 28, 2026
Merged

zcsizmadia merged 1 commit into
mainfrom
feat-writeback

Conversation

@zcsizmadia

Copy link
Copy Markdown
Collaborator

Coalesces a file's writes and flushes on fsync/close (--writeback). Verified in WSL. Documents hardlink limitation.

Closes #12

`wsldrive mount ... --writeback` buffers a file's writes per open handle and
coalesces a contiguous run, flushing on fsync/flush/release or when the buffer
passes 8 MiB. This cuts socket round-trips for write-heavy patterns (e.g. build
output) at the cost of durability landing at flush/close rather than per write.
Default stays write-through (durable per write). Reads flush any pending buffer
first, so they never see stale bytes.

Verified in WSL: 2000 small writes then close produced the exact file at the
agent (2000 lines / 18890 bytes, content byte-for-byte equal); read-back through
the mount matches.

Also documents the remaining #12 item: hardlinks are reported as independent
files (st_nlink not preserved) — a known limitation requiring an attributes/
protocol change disproportionate to its value for now.

Closes #12

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@zcsizmadia
zcsizmadia merged commit b6bff2a into main Aug 28, 2026
3 checks passed
@zcsizmadia
zcsizmadia deleted the feat-writeback branch August 28, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 3 follow-up — write-back journal, ignore rules, name escaping, hardlinks

1 participant