Spdk/module/bdev/nvme
Shuhei Matsumoto c10889dc78 bdev/nvme: Set ana_state_updating only after starting read ANA log page
In a test case, test/nvmf/host/failover.sh, we got ANA error even if
the target did not enable ANA reporting.

We marked the corresponding namespace as ANA state updating but we had
no way to clear it.

Check if we can read ANA log page before setting the flag.

If read ANA log page failed, disable ANA feature until the nvme_ctrlr
is created again. In this operation, all ana_state_updating flags are
cleared.

Fixes #2335

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11399 (master)

(cherry picked from commit 79829ae40b)
Change-Id: I4e2608a35d9dfa0395ad74fceebae9faf8cd973c
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12466
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-06-30 13:32:31 -04:00
..
bdev_nvme_cuse_rpc.c bdev/nvme: Rename nvme_bdev_ctrlr by nvme_ctrlr 2021-07-13 08:57:33 +00:00
bdev_nvme_rpc.c bdev/nvme: Add nvme_ctrlr's state string to the bdev_nvme_get_controllers RPC 2022-06-30 13:32:30 -04:00
bdev_nvme.c bdev/nvme: Set ana_state_updating only after starting read ANA log page 2022-06-30 13:32:31 -04:00
bdev_nvme.h bdev/nvme: Do not use ctrlr for I/O submission if reconnect failed repeatedly 2022-06-30 13:32:30 -04:00
Makefile bdev/nvme: Remove common.h/common.c 2021-09-08 08:06:39 +00:00
nvme_rpc.c bdev/nvme: Remove common.h/common.c 2021-09-08 08:06:39 +00:00
vbdev_opal_rpc.c bdev/nvme: Remove common.h/common.c 2021-09-08 08:06:39 +00:00
vbdev_opal.c bdev/nvme: Use an RB_TREE to hold namespaces in the controller 2022-06-30 13:32:26 -04:00
vbdev_opal.h bdev/nvme: Remove common.h/common.c 2021-09-08 08:06:39 +00:00