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

change handle_io_async return type to void #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattysweeps
Copy link
Contributor

@mattysweeps mattysweeps commented Jan 24, 2025

The return value is never checked. Invocations of handle_io_async are expected to call ublksrv_complete_io even in an error occurred, so it's cleaner if that responsibility stays with the target in every case.

Returning void also matches the similar function submit_bio() in the kernel.

Fixes #81

The return value is never checked. Invocations of handle_io_async
are expected to call ublksrv_complete_io even in an error
occurred, so it's cleaner if that responsibility stays with
the target in every case.

Returning void also matches the similar function `submit_bio()`
in the kernel.
@ming1
Copy link
Collaborator

ming1 commented Jan 25, 2025

->handle_io_async is part of libublksrv interface(ABI), and we can't change its type any more, otherwise it may break existed external applications.

But we can document the point that the return value is ignored by libublksrv,
it is user's responsibility for handling any failure.

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.

The return value of tgt_ops->handle_io_async is never checked
2 participants