This patch series enables protection information support with io_uring passthrough (io_uring_cmd) ioengine. This support is added for both DIF (extended logical blocks) and DIX (separate metadata buffer) cases. The initial patch adds support for metadata buffer. As we are unaware of metadata size during metadata buffer allocation, we provide an option md_per_io_size. This must be used to specify metadata size for single IO, if namespace is formatted with separate metadata buffer. This then enables the protection information support with and without PRACT bit set for both DIF and DIX cases. The support covers 16-bit and 64-bit guard protection information format, without storage tags. As 32-bit guard protection information format mandates minimum 16 bits for storage tags, it is not considered. For the sake of consistency metadata and protection information specific options are the same as the ones used by SPDK's external ioengine. This series also borrows relevant kernel crc16-t10 and NVMe CRC64 generation files, along with 48-bit accessors for reference tags. The NVMe CRC64 table is not generated at build time which is what kernel does. This will be done in future. Changes from v2: - fix windows/mac build issue from crct10 files (missed during v2) https://github.com/fiotestbot/fio/actions/runs/5830346708 Changes from v1: - Fixed build issue on windows and macos. - Changed name of CRC64 tables and algorithm as per NVMe command set specification (Keith's suggestion). - Addressed review comments from Vincent. Ankit Kumar (10): engines:io_uring: add missing error during open file engines:io_uring: update arguments to fetch nvme data engines:io_uring: enable support for separate metadata buffer engines:io_uring: uring_cmd add support for protection info io_u: move engine data out of union crc: pull required crc16-t10 files from linux kernel engines:io_uring: generate and verify pi for 16b guard crc: pull required crc64 nvme apis from linux kernel engines:nvme: pull required 48 bit accessors from linux kernel engines:io_uring: generate and verify pi for 64b guard HOWTO.rst | 39 ++++ crc/crc-t10dif.h | 9 + crc/crc64.c | 32 +++ crc/crc64.h | 3 + crc/crc64table.h | 130 ++++++++++++ crc/crct10dif_common.c | 78 +++++++ engines/io_uring.c | 225 +++++++++++++++++--- engines/nvme.c | 466 +++++++++++++++++++++++++++++++++++++++-- engines/nvme.h | 230 +++++++++++++++++++- fio.1 | 38 ++++ io_u.h | 2 +- 11 files changed, 1199 insertions(+), 53 deletions(-) create mode 100644 crc/crc-t10dif.h create mode 100644 crc/crc64table.h create mode 100644 crc/crct10dif_common.c -- 2.25.1