engines:io_uring: uring_cmd add support for protection info
authorAnkit Kumar <ankit.kumar@samsung.com>
Mon, 14 Aug 2023 14:57:41 +0000 (20:27 +0530)
committerVincent Fu <vincent.fu@samsung.com>
Mon, 14 Aug 2023 14:27:33 +0000 (10:27 -0400)
commit3ee8311a30dcea86c5709b2523b9cd5cf7ba2423
treeb8842995ecce2ca82854144bb58b71c048171797
parent2d6451c97582baef27e4ca28892b033b8061faaa
engines:io_uring: uring_cmd add support for protection info

This patch enables support for protection information to nvme command
backend of io_uring_cmd ioengine. The patch only supports protection
information action bit set to 1, for read and write operation.

This adds 4 new ioengine specific options
 * pi_act - Protection information action. Default: 1
 * pi_chk - Can be set to GUARD, APPTAG or REFTAG
 * apptag - Sets apptag field of command dword 15
 * apptag_mask - Sets apptag_mask field of command dword 15

For the sake of consistency these options are the same as the ones used
by SPDK's external ioengine.

For pi_act=1, if namespace is formatted with metadata size equal to
protection information size, the nvme controller inserts and removes
protection information for write and read command respectively.
Added a check so that fio doesn't send metadata for such cases.

Storage tag support is not present, so return an error for that.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Link: https://lore.kernel.org/r/20230814145747.114725-5-ankit.kumar@samsung.com
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
HOWTO.rst
engines/io_uring.c
engines/nvme.c
engines/nvme.h
fio.1