Skip to content

Commit

Permalink
Merge branch 'io_uring/fix-negative-cqe-status' of https://github.com…
Browse files Browse the repository at this point in the history
…/minwooim/fio

* 'io_uring/fix-negative-cqe-status' of https://github.com/minwooim/fio:
  options: Add support hex value to ignore_error
  io_uring: Fix the flip to negative of CQE status
  • Loading branch information
axboe committed May 28, 2024
2 parents 85b5eb3 + f26af3d commit dfccaca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion engines/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ static struct io_u *fio_ioring_cmd_event(struct thread_data *td, int event)
io_u = (struct io_u *) (uintptr_t) cqe->user_data;

if (cqe->res != 0) {
io_u->error = -cqe->res;
io_u->error = abs(cqe->res);
return io_u;
} else {
io_u->error = 0;
Expand Down
6 changes: 5 additions & 1 deletion options.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,11 @@ static int ignore_error_type(struct thread_data *td, enum error_type_bit etype,
if (fname[0] == 'E') {
error[i] = str2error(fname);
} else {
error[i] = atoi(fname);
int base = 10;
if (!strncmp(fname, "0x", 2) ||
!strncmp(fname, "0X", 2))
base = 16;
error[i] = strtol(fname, NULL, base);
if (error[i] < 0)
error[i] = -error[i];
}
Expand Down

0 comments on commit dfccaca

Please sign in to comment.