From 2389caa4f51583425efd993d7066021b17e97ff3 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 26 Nov 2019 13:50:51 -0700 Subject: [PATCH] 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 Change-Id: Ie66a5ffbcb52dd0e8f8e67a14f66f19d325d91bd Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475933 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Tomasz Zawadzki Reviewed-by: Changpeng Liu Reviewed-by: Konrad Sztyber Reviewed-by: Ben Walker --- module/bdev/nvme/common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module/bdev/nvme/common.h b/module/bdev/nvme/common.h index 98c57e28c6..cb68c198c6 100644 --- a/module/bdev/nvme/common.h +++ b/module/bdev/nvme/common.h @@ -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;