bdev/nvme: explain the "populated" flag with a comment

This was previously named "active" as in "active
namespace".  But we're really using this flag to keep
track of whether the namespace structure is currently
populated with data structures, bdevs, etc. for the
associated namespace.  If we find an active namespace
on an SSD that is not populated with bdevs in the
bdev/nvme module, then we need to populate it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie66a5ffbcb52dd0e8f8e67a14f66f19d325d91bd

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475933
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Jim Harris 2019-11-26 13:50:51 -07:00 committed by Tomasz Zawadzki
parent b7d00f19e6
commit 2389caa4f5

View File

@ -53,6 +53,12 @@ enum nvme_bdev_ns_type {
struct nvme_bdev_ns {
uint32_t id;
enum nvme_bdev_ns_type type;
/** Marks whether this data structure has its bdevs
* populated for the associated namespace. It is used
* to keep track if we need manage the populated
* resources when a newly active namespace is found,
* or when a namespace becomes inactive.
*/
bool populated;
struct spdk_nvme_ns *ns;
struct nvme_bdev_ctrlr *ctrlr;