+2
−0
Loading
nvme_ctrlr_construct_namespace() marks namespaces as active immidietly after identify controller is received. In practive the state of the namespace can change before identify namespace is received. Despite that after reading nsdata it remained in previous state. nvme_ns_construct() continued without interruption, finally reaching nvme_ctrlr_populate_namespaces() still marked as active. Which assumed that zero filled size meant a resize. It could have been observed by following notice: bdev_nvme.c:5143:nvme_ctrlr_populate_namespaces: *NOTICE*: [nqn.2016-06.io.spdk:testnqn, 1] NSID 169 is resized: bdev name nvme0n169, old size 25600, new size 0 To fix that, make sure to set appropriate ns state from identify ns data. The test exposes this issue by increasing number of threads sending the add/remove_ns RPCs to the target. This means that target will now handle that many RPCs at once. 8 threads was found to be the sweetspot to reproduce this issue on every test run in my setup. Change-Id: I435e91e598a77ff77d4b028157b7ef49e8f4af14 Signed-off-by:Tomasz Zawadzki <tomasz.zawadzki@nutanix.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26397 Reviewed-by:
Ben Walker <ben@nvidia.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Reviewed-by:
Jacek Kalwas <jacek.kalwas@nutanix.com> Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Community-CI: Mellanox Build Bot