diff options
| author | Chuck Lever <cel@kernel.org> | 2026-09-08 09:42:34 -0400 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-10-04 21:15:29 -0400 |
| commit | 1e7f9d30d519d3df6953d4ab6a045063bb8b5896 (patch) | |
| tree | 1993130e79d3af3d6490d93d383e8810031f61b4 /rust/kernel/alloc/kvec/errors.rs | |
| parent | 9ebc61dfe93622ad1fc9d2323e3f9f8819fe142d (diff) | |
xdrgen: Stream optional-data aggregate lists during encode
The optional-data aggregate encoder loops cursor.count times, so the
begin hook must report the element count before the first element is
written. A producer that reads its elements while the reply is
encoded -- NFSv2 READDIR streaming directory entries straight into the
send buffer -- does not know that count in advance, and would have to
materialize the whole list just to satisfy the loop bound.
An optional-data list carries no count on the wire, so nothing forces
one on the encoder. Drive it from the item hook instead: a false
return ends the list, and the framing writes the terminator.
The counted-array form and its hook contract are unchanged. No
in-tree spec marks an optional-data member yet, so no generated code
changes here.
Acked-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260908134234.512312-11-cel@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
