bdev/nvme: remove noticelog for no namespaces
A controller with no namespaces is perfectly valid. So remove the noticelog when a controller with no namespaces is found. This helps reduce some complexity. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ica184f1209414185dd4df3531f3a1002a2899590 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475792 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
6f65c6c170
commit
9a78ffbbc8
@ -1781,7 +1781,6 @@ nvme_ctrlr_populate_namespaces(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr)
|
||||
{
|
||||
struct nvme_bdev_ns *ns;
|
||||
int rc;
|
||||
int bdevs_created = 0;
|
||||
uint32_t nsid;
|
||||
|
||||
for (nsid = spdk_nvme_ctrlr_get_first_active_ns(nvme_bdev_ctrlr->ctrlr);
|
||||
@ -1795,16 +1794,11 @@ nvme_ctrlr_populate_namespaces(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr)
|
||||
rc = nvme_ctrlr_populate_namespace(nvme_bdev_ctrlr, ns);
|
||||
if (rc == 0) {
|
||||
ns->active = true;
|
||||
bdevs_created++;
|
||||
} else {
|
||||
memset(ns, 0, sizeof(*ns));
|
||||
SPDK_NOTICELOG("Failed to populate namespace %u of %s\n", nsid, nvme_bdev_ctrlr->name);
|
||||
}
|
||||
}
|
||||
|
||||
if (bdevs_created == 0) {
|
||||
SPDK_NOTICELOG("No bdev is created for NVMe controller %s\n", nvme_bdev_ctrlr->name);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user