Skip to contentSkip to conversation

engines/io_uring_cmd: skip pi verify checks for error cases

PATCH Applied Ankit Kumar 2 participants 2 messages Dec 12, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20231212092942epcas5p28e0b580bf48a7d932f1d801a7d4226dd@epcas5p2.samsung.com

#1 lore raw

PATCH 1/1 engines/io_uring_cmd: skip pi verify checks for error cases

If any error is observed for read requests, skip all end to end data protection checks.

---
 engines/io_uring.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
engines/io_uring.c +4 -2
index 5ae3135b..c0cb5a78 100644
@@ -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);
Signature · 1 line
2.25.1
Applied
#2 lore raw
Quoted 17 lines · Ankit Kumar

If any error is observed for read requests, skip all end to end data protection checks.

---
  engines/io_uring.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
engines/io_uring.c +0 -1
index 5ae3135b..c0cb5a78 100644
@@ -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)

engines/io_uring.c static struct io_u *fio_ioring_cmd_event(struct thread_data *td, int event) · line 479

Quoted 10 lines
engines/io_uring.c +4 -1
+	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);

Applied. Thanks.