summaryrefslogtreecommitdiff
path: root/src/session_test.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-22 11:17:13 -0300
committerGabriel Schneider <[email protected]>2026-09-22 11:17:13 -0300
commit1f3aff78702b65c328384bc5b422c448751e809b (patch)
treeb6cd678dbcfb946238c2a7fc87c24827166f043f /src/session_test.zig
parent9c4d668c926e2d9eae6ef87cd9b391d8185605f9 (diff)
downloadcloud9-1f3aff78702b65c328384bc5b422c448751e809b.tar.gz
cloud9-1f3aff78702b65c328384bc5b422c448751e809b.zip
fs: let open, truncate, clunk and remove park on again, not only reads and writes
A backend that is not ready for a request answers `again` and the engine parks the request, so the connection goes on answering everything else and a retry asks the parked request later. That only worked for a read, readdir or write; every other op answering `again` failed with EAGAIN on the spot. pardes needs the rest. Its 9P is answered on the connection's task while the editor's own thread may be out in a syscall in the middle of a step, and in that window a request that would change a pane -- an open of /pane/new, a truncating open or wstat, a remove -- has to wait, not fail, and has to wait without holding the connection up, because the editor's own request may be the next frame on that very connection (it is, when the syscall goes through a mount of the editor's own tree). Parking is exactly that. A parked open, wstat, clunk or remove goes back into the job slot on retry and its reply then goes through `jobReply` like any other, which is why the slot keeps only what an open needs (`omode`, `step`); a wstat parks only as the truncation to zero a Linux client sends for O_TRUNC, and a clunk parks before it lets its fid go, since a release that was never paid still owns its handle. A walk, attach, stat, create or renaming wstat keeps names in the input frame that parking lets go of, so those still answer EAGAIN. A parked job retried and parked again sits the round out like a retried read does -- without that the first version of this looped forever in `retry`. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'src/session_test.zig')
0 files changed, 0 insertions, 0 deletions