io_uring: Add .errdetails to parse CQ status
authorMinwoo Im <minwoo.im@samsung.com>
Thu, 15 Aug 2024 23:12:34 +0000 (08:12 +0900)
committerMinwoo Im <minwoo.im.dev@gmail.com>
Fri, 16 Aug 2024 12:08:01 +0000 (21:08 +0900)
commit2a13699a89dca4433fa3ecd6cd9eafbbc8dfb371
tree57c7890add2a72e272a8f46526400422dc4b03a0
parent0c89abc1368936b9de836b77ab87e91a1ef5a7f8
io_uring: Add .errdetails to parse CQ status

Background
 - fio normally prints out the strerr and errno value when facing
   errors.  In case of io_uring_cmd ioengine with --cmd_type=nvme,
   io_u->error represents the CQ entry status code type and status
   code which should be parsed as a NVMe error value rather than
   errno.

In io_u error failure condition, it prints out parsed CQ entry error
status values with SCT(Status Code Type) and SC(Status Code).  The print
will be like the following example:

  fio: io_uring_cmd: /dev/ng0n1: cq entry status (sct=0x00; sc=0x04)

If --cmd_type!=nvme, it prints out generic status code like below:

  fio: io_uring_cmd: /dev/<devnode>: status=0x4

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
engines/io_uring.c