-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
io_uring: Add IO_U_F_DEVICE_ERROR to identify error types
__io_u_log_error expects a positive value of io_u->error parsing it with strerror() expecting it to be an errno. io_uring_cmd (cmd_type=nvme), for example, has returned errno value as a positive value and device-specific CQE status type and code as well. Commit 78831c6 ("io_uring: Fix the flip to negative of CQE status") has put the abs() to the cqe->res, and it caused confusions between the actual CQE stauts and the system error value (errno). Now we have Commit 2a13699 ("io_uring: Add .errdetails to parse CQ status"), meaning that io_uring_cmd ioengines will parse the actual value of io_u->error value as CQE status value, so we should know if the value is for CQE status or errno. This patch added a flag IO_U_F_DEVICE_ERROR to io_u to represent if io_u->error has device-specific error value, otherwise it's errno. Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com> Link: https://lore.kernel.org/r/20240926004134.26004-1-minwoo.im.dev@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
- Loading branch information
Showing
3 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters