You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WasmFS: Allow backends to implement readv to support pipes #16269
Right now WasmFS implements readv by issuing multiple individual reads to a backend, so there's no way for the backend to tell the difference between a single large read using multiple iovecs and multiple smaller reads each using one iovec. This makes it impossible to correctly implement pipes.
Pipe semantics are that reads return immediately when data is available even if the read requests more data than is available, but reads block when there is no data available. If an overlarge read that should not block is split over multiple iovecs, one of the multiple backend reads might precisely empty the pipe and the next backend read call will incorrectly block because the backend will think that it is a new read call on an empty pipe rather than a continuation of the same read call.
The fix is to give backends visibility into full readv calls, not just individual single-buffer reads.
We should also look into whether there is an analogous problem for writes.
Activity
shashank-mishra14 commentedon Feb 23, 2023
Kindly assign this issue to me.
Reword test_fs_writev_gather WasmFS skip reason as a known limitation