summaryrefslogtreecommitdiff
path: root/src/esp32p4.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 14:41:52 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit8598a5fbe6ffecad46891957356d47a37649e547 (patch)
tree777230263f4214720a4e1dcbb2f9ea4a8a0bb4fd /src/esp32p4.zig
parentb9eefda75ab9a63fc510de781d02b92fc04ad31d (diff)
downloadpardes-8598a5fbe6ffecad46891957356d47a37649e547.tar.gz
pardes-8598a5fbe6ffecad46891957356d47a37649e547.zip
A write of a multiple of 4096 bytes holds the partial line it ends with, as one that fills its Twrite does: a burst through a mount no longer runs its cut lines as two commands
selfmount's 1000-line burst reported 943 lines, on main too. The log ring was not losing records: a follower opened before the burst heard exactly 943 and no `lost`, and the burst itself exited 1 with `err 1 exec: wrong #args in control message "Msg"`. `seq ... > exec` through the mount arrives as stdio's 4096-byte writes, each shorter than a Twrite. The rule that such a write is whole ran each one's cut last line at once, so both halves of the line ran as commands (hence `exit 127` records). At 12288 bytes the cut left a bare `Msg`, which was refused and failed the write and the rest of the burst. A write of a multiple of 4096 bytes is where a writer's buffer (stdio, a page cache) filled, so it may go on: its unended tail now waits for the next write or the close, like one that fills its Twrite. `printf Save > exec` stays whole at once. fs.md says so, the 9P fuzzer's model of served lines follows it, and a unit test cuts a `Msg` at 4096 bytes. A follower does not lose records silently: a ring that outruns one already reads it `lost N` first (documented, tested). selfmount now follows the log from before the burst, so it checks every line heard once, in order, or a loss said, not a fresh open of a 64 KiB ring. It passed 3 in 3 and joins the gates with the new 9ns. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/esp32p4.zig')
0 files changed, 0 insertions, 0 deletions