engines/io_uring_cmd: skip pi verify checks for error cases
authorAnkit Kumar <ankit.kumar@samsung.com>
Tue, 12 Dec 2023 14:47:18 +0000 (20:17 +0530)
committerVincent Fu <vincent.fu@samsung.com>
Tue, 12 Dec 2023 14:39:06 +0000 (09:39 -0500)
If any error is observed for read requests, skip all end to end data
protection checks.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Link: https://lore.kernel.org/r/20231212144718.568406-1-ankit.kumar@samsung.com
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
engines/io_uring.c

index 5ae3135bc73821b475ce04d8dde5b68030b95e90..c0cb5a78f7bdaac645d23dada975b271c363b7ec 100644 (file)
@@ -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);