[PATCH blktests 00/15] nvme: prepare for ANA support
Shin'ichiro Kawasaki
shinichiro.kawasaki at wdc.com
Wed Oct 23 18:00:10 PDT 2024
Hannes reworked the nvme test group scripts to support ANA, or Asymmetric
Namespace Access. This work is tracked with GitHub PR 146 [1]. The amount of
change is large, then I split them into a few series for easier review. This is
the first series, which prepares for the ANA support. Review comments will be
appreciated. It consists of a number of improvements, such as port handling
improvements, helper function simplification, code readability improvements, and
so on.
[1] https://github.com/osandov/blktests/pull/146
Most of the patches were authored by Hannes. On top of that, I added 5 patches:
- 4th 5th 6th: fix issues the 3rd patch caused
- 11th: fix an issue the 10th patch caused
- 12th: fix an existing issue found during this work
The 3rd patch caused the failure of the test case nvme/037 with fc transport.
I'm not sure if it unveils a kernel bug, or if it should be fixed in blktests.
I found the following change for the test case avoids the failure, which
adds short waits after nvme disconnect and target cleanup. Comments on this
change by nvme-fc experts will be appreciated.
diff --git a/tests/nvme/037 b/tests/nvme/037
index 33a6857..e00f632 100755
--- a/tests/nvme/037
+++ b/tests/nvme/037
@@ -36,7 +36,13 @@ test_device() {
_nvme_disconnect_subsys \
--subsysnqn "${subsys}${i}" >>"${FULL}" 2>&1
+ if [[ ${nvme_trtype} == fc ]]; then
+ sleep .1
+ fi
_nvmet_passthru_target_cleanup --subsysnqn "${subsys}${i}"
+ if [[ ${nvme_trtype} == fc ]]; then
+ sleep .1
+ fi
if [[ -z "$nsdev" ]]; then
echo "FAIL: Failed to find passthru target namespace"
Hannes Reinecke (10):
nvme/038: use nvme_trtype instead of hardcoding
nvme, md/001: make trtype argument to _create_nvmet_port() optional
nvme: sanitize transport parameter in _create_nvmet_port()
nvme: return error from _find_nvme_ns()
nvme: simplify _get_nvmet_ports()
nvme: check for controller device in _nvme_connect_subsys()
nvme: pass in port parameter to _nvme_connect_subsys()
nvme: delete all namespaces in _remove_nvmet_subsystem()
common/nvme, nvme/{016,017,052}: improve _create_nvmet_ns()
nvme, md/001: support only long options for _create_nvmet_subsystem()
Shin'ichiro Kawasaki (5):
nvme: introduce wwnn/wwpn helper functions
nvme/{rc,002,016,017,030}: pass port ID to genctr helper functions
nvme: fix fc port clean up failure
common/nvme, nvme/003: add --no_port option to _nvme_connect_subsys
nvme: remove "local -n" from _get_nvmet_ports()
common/nvme | 281 +++++++++++++++++++++++++++++++++++--------------
tests/md/001 | 6 +-
tests/nvme/002 | 5 +-
tests/nvme/003 | 3 +-
tests/nvme/016 | 17 ++-
tests/nvme/017 | 18 ++--
tests/nvme/030 | 15 +--
tests/nvme/031 | 2 +-
tests/nvme/038 | 2 +-
tests/nvme/052 | 8 +-
tests/nvme/rc | 43 +++++---
11 files changed, 265 insertions(+), 135 deletions(-)
--
2.45.2
More information about the Linux-nvme
mailing list