Skip to content

WasmFS: Allow backends to implement readv to support pipes #16269

Open

Description

@tlively

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

  1. moved this to Todo in WasmFSon Feb 12, 2022
  2. added this to the WasmFS feature parity milestone on Feb 12, 2022
  3. shashank-mishra14 commented on Feb 23, 2023

    @shashank-mishra14

    Kindly assign this issue to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

  • Status
    Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions