Shuhei Matsumoto f26d6c73e1 bdev/nvme: Set nvme_ns->populated to true just after nvme_ns is available
A few patches including this patch will remove nvme_ns->ref by
nvme_ns->populated and nvme_ns->bdev and remove nvme_ns->ref.

In this patch, set nvme_ns->populated to true when nvme_ns->ref is
incremented, i.e., nvme_ns is available. nvme_ctrlr_populate_namespace_done()
clears nvme_ns->populated if creating bdev failed by memset().
And add assert to nvme_ctrlr_depopulate_namespace_done() to ensure
nvme_ns->populated is false when nvme_ctrlr_depopulated_namespace_done()
is called.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I536933abb516c0a29231149ab564dc8b84245b10
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7096
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-04-08 16:10:26 +00:00
..
2021-02-05 14:43:47 +00:00
2021-02-05 14:43:47 +00:00
2021-02-05 14:43:47 +00:00
2021-02-05 14:43:47 +00:00
2021-02-05 14:43:47 +00:00
2021-02-05 14:43:47 +00:00
2021-02-05 14:43:47 +00:00
2021-02-05 14:43:47 +00:00
2021-02-05 14:43:47 +00:00
2020-09-25 11:43:42 +00:00