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

Pre dev 0.3: cleanup io & uring_async #11

Merged
merged 7 commits into from
Mar 2, 2024
Merged

Pre dev 0.3: cleanup io & uring_async #11

merged 7 commits into from
Mar 2, 2024

Conversation

ming1
Copy link
Collaborator

@ming1 ming1 commented Mar 2, 2024

  • improve comment on uring_async
  • change return value of tgt_init into Result<(), UblkError>
  • don't expose UblkQeue::q_ring, by adding UblkQueue::ublk_submit_sqe_sync(), and UblkQueue::uring_op() &
    UblkQueue::uring_op_mut()
  • don't expose UblkQueue::get_io_buf_addr
  • example/null: avoid to allocate io buffer for user_copy

Now IO buffer is managed by target code, which needn't to retrieve
buffer address from libublk any more.

Inside io module, it is only used for discarding registered io buffers.

Also mark it as not 'inline' which is only called in slow path.

Signed-off-by: Ming Lei <[email protected]>
The annotation is obsolete now, so remove them

Signed-off-by: Ming Lei <[email protected]>
Add UblkQueue::ublk_submit_sqe_sync() so that target code can use
it to submit sqe in non-async/.await code.

Signed-off-by: Ming Lei <[email protected]>
No need to return anything Ok() except for 0 from tgt_init()

Signed-off-by: Ming Lei <[email protected]>
Now we don't have users for manipulating q_ring directly, but there
could be potential use cases, such as, changing uring flags, register
files, ...

So add UblkQueue::uring_op() and UblkQueue::uring_op_mut() for such
purpose.

Signed-off-by: Ming Lei <[email protected]>
@ming1 ming1 merged commit 202d278 into main Mar 2, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant