Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH blktests] nvme/{033,036,037}: skip when the test target namespace has metadata
@ 2026-06-30 11:37 Shin'ichiro Kawasaki
  2026-07-11 23:14 ` Shin'ichiro Kawasaki
  0 siblings, 1 reply; 2+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-06-30 11:37 UTC (permalink / raw)
  To: linux-nvme; +Cc: Logan Gunthorpe, Chao Shi, Shin'ichiro Kawasaki

The kernel commit c8cdecdb47d3 ("nvme: core: reject invalid LBA data
size from Identify Namespace") in the v7.2-rc1 tag triggered failures of
blktests test cases nvme/033, 036 and 037. The failures are observed
when TEST_DEV specifies a NVMe device with metadata. The commit
introduced a new check in nvme_update_ns_info_block() to reject invalid
LBA data size. After this commit, namespaces with zero LBA data size are
rejected.

According to the comment in nvmet_passthru_override_id_ns() in the
kernel code drivers/nvme/target/passthru.c, "Presently the NVMEoF target
code does not support sending metadata, so we must disable it here". For
that purpose, the function sets the LBA data size to zero for all LBA
format (lbaf) entries with metadata. After the trigger commit, these
entries become invalid for NVMEoF target passthru, then namespaces with
metadata are not visible as block devices through the target setup.

These test cases set up NVMEoF target passthru assuming the namespace
devices are visible, so they cannot find the namespaces and fail.

To avoid the failures, skip the test cases when TEST_DEV has metadata.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/nvme/033 | 1 +
 tests/nvme/036 | 1 +
 tests/nvme/037 | 1 +
 3 files changed, 3 insertions(+)

diff --git a/tests/nvme/033 b/tests/nvme/033
index d0581c2..5bb1f45 100755
--- a/tests/nvme/033
+++ b/tests/nvme/033
@@ -15,6 +15,7 @@ requires() {
 
 device_requires() {
 	_require_test_dev_is_not_nvme_multipath
+	_test_dev_has_no_metadata
 }
 
 set_conditions() {
diff --git a/tests/nvme/036 b/tests/nvme/036
index 11cd5c1..9e6249f 100755
--- a/tests/nvme/036
+++ b/tests/nvme/036
@@ -15,6 +15,7 @@ requires() {
 
 device_requires() {
 	_require_test_dev_is_not_nvme_multipath
+	_test_dev_has_no_metadata
 }
 
 set_conditions() {
diff --git a/tests/nvme/037 b/tests/nvme/037
index 33a6857..24c895a 100755
--- a/tests/nvme/037
+++ b/tests/nvme/037
@@ -14,6 +14,7 @@ requires() {
 
 device_requires() {
 	_require_test_dev_is_not_nvme_multipath
+	_test_dev_has_no_metadata
 }
 
 set_conditions() {
-- 
2.54.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-11 23:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-30 11:37 [PATCH blktests] nvme/{033,036,037}: skip when the test target namespace has metadata Shin'ichiro Kawasaki
2026-07-11 23:14 ` Shin'ichiro Kawasaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox