+14
−11
Loading
nvme_ns_alloc has been renamed to nvme_ns_create, as it now also acquires a controller reference. This helps reduce the number of scattered controller reference releases in this module. Unfortunately, we cannot place RB_INSERT/RB_REMOVE inside the create/delete functions due to non-trivial flows - see nvme_ctrlr_depopulate_namespace_done (which removes the namespace from the list and terminates the flow if nbdev is set) and bdev_nvme_destruct, which doesn’t remove the namespace from the list (as this should be handled by nvme_ctrlr_depopulate_namespace_done). Inserting during the populate phase was also considered, but we need to have the object on the list early to avoid the risk of populating it twice. Change-Id: Ic298275b471fccada925740077310efa6b3d856a Signed-off-by:Jacek Kalwas <jacek.kalwas@nutanix.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26881 Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Reviewed-by:
Tomasz Zawadzki <tomasz@tzawadzki.com> Community-CI: Mellanox Build Bot