Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vectored IO for files #266

Open
3 tasks
NKID00 opened this issue Jun 2, 2024 · 1 comment
Open
3 tasks

Vectored IO for files #266

NKID00 opened this issue Jun 2, 2024 · 1 comment
Labels
F-feature-request feature request

Comments

@NKID00
Copy link
Contributor

NKID00 commented Jun 2, 2024

Is your feature request related to a problem? Please describe.
Vectored IO for files is neither implemented directly nor through AsyncWriteRent and AsyncReadRent traits.

Describe the solution you'd like

  • Add a new vectored IO op struct with offset or manipulate current op struct definition.
  • Implement vectored IO with optional offset argument for File struct.
  • Implement AsyncWriteRent and AsyncReadRent traits for File struct.

Describe alternatives you've considered
It is possible to emulate vectored write through multiple single writes, but that missed the point of using io_uring.

Additional context
io_uring provides an option to specify offset for vectored IO but monoio's WriteVec and ReadVec op structs don't support it. We could add a new vectored IO op struct with offset or manipulate current op struct definition.

For tcp and unix sockets, vectored IO is implemented through AsyncWriteRent and AsyncReadRent.

Not implementing AsyncWriteRent and AsyncReadRent also causes BufWriter and BufReader to be unusable for files. See #133.

@Xuanwo
Copy link
Collaborator

Xuanwo commented Jun 26, 2024

For context, this issue arises from opendal's efforts to integrate with monoio-fs: apache/opendal#4552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-feature-request feature request
Projects
None yet
Development

No branches or pull requests

2 participants