diff options
Diffstat (limited to 'src/9p_io.zig')
| -rw-r--r-- | src/9p_io.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig index 6cf75c99..d80d7b30 100644 --- a/src/9p_io.zig +++ b/src/9p_io.zig @@ -1937,6 +1937,8 @@ test "9P shell environment states being inside pardes apart from how to reach it pub const Client = struct { pub const budget_ms: i64 = 2000; + /// Each write of a long one has this long to be answered (transact). + pub const write_budget_ms: i64 = 30_000; pub const max_depth: usize = 2 * ninep.max_welem; @@ -2211,6 +2213,12 @@ pub const Client = struct { const count = (try s.ask(.{ .write = .{ .fid = cur, .offset = written, .data = chunk } }, remote)).write; if (count == 0 or count > chunk.len) return Error.Botch; written += count; + // A long write is timed by its progress: each answer gives + // the next its own budget, so a large body (`pardes -`) goes + // in through one open, whole, however long it takes. The + // budget is a write's: a server putting in tens of MiB it + // held (pane.zig batchFor) answers that one write late. + s.deadline = nowMs() +| write_budget_ms; } return; } |
