Keith contributed a test case to cover nvme metadata passthrough [1], which confirms a kernel fix by the commit 43a67dd812c5 ("block: flip iter directions in blk_rq_integrity_map_user()"). I made some slight improvements on it and repost as this series. The first patch introduces two helper functions to check requirements of the test target namespaces. The second patch adds the test case. [1] https://lore.kernel.org/linux-nvme/20250609154122.2119007-1-kbusch@xxxxxxxx/ P.S. When I ran blktests to confirm this patch using QEMU nvme namespaces with metadata as TEST_DEV, I found some existing test cases fail: nvme/034, 035, 049 and 053. Three of the test cases need improvements to avoid the failure. I'm preparing another series for it. The other test case nvme/053 shows weird fio failure. It passes with metadata size 8 bytes and 16 bytes (md=8 and md=16 QEMU options. But it fails when metadata size is 64 bytes (md=64). This needs some more debug effort. Keith Busch (1): nvme: add nvme metadata passthrough test Shin'ichiro Kawasaki (1): nvme/rc: introduce helper functions to check namespace metadata src/.gitignore | 1 + src/Makefile | 1 + src/nvme-passthrough-meta.c | 232 ++++++++++++++++++++++++++++++++++++ tests/nvme/064 | 34 ++++++ tests/nvme/064.out | 2 + tests/nvme/rc | 23 ++++ 6 files changed, 293 insertions(+) create mode 100644 src/nvme-passthrough-meta.c create mode 100755 tests/nvme/064 create mode 100644 tests/nvme/064.out -- 2.49.0