Skip to content

Commit

Permalink
engines/io_uring_cmd: skip pi verify checks for error cases
Browse files Browse the repository at this point in the history
If any error is observed for read requests, skip all end to end data
protection checks.

Signed-off-by: Ankit Kumar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vincent Fu <[email protected]>
  • Loading branch information
ankit-sam authored and vincentkfu committed Dec 12, 2023
1 parent 63e6f55 commit f53eaac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions engines/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,12 @@ static struct io_u *fio_ioring_cmd_event(struct thread_data *td, int event)
cqe = &ld->cq_ring.cqes[index];
io_u = (struct io_u *) (uintptr_t) cqe->user_data;

if (cqe->res != 0)
if (cqe->res != 0) {
io_u->error = -cqe->res;
else
return io_u;
} else {
io_u->error = 0;
}

if (o->cmd_type == FIO_URING_CMD_NVME) {
data = FILE_ENG_DATA(io_u->file);
Expand Down

0 comments on commit f53eaac

Please sign in to comment.