bdev/nvme: Correct variable name
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com> Change-Id: If7d55636eed5e03d002ca6ea6a24d96b127ae705 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471621 Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
c30609c9ea
commit
c330fbe618
@ -1696,7 +1696,7 @@ nvme_ctrlr_create_bdevs(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr)
|
|||||||
{
|
{
|
||||||
struct nvme_bdev_ns *ns;
|
struct nvme_bdev_ns *ns;
|
||||||
int rc;
|
int rc;
|
||||||
int bdev_created = 0;
|
int bdevs_created = 0;
|
||||||
uint32_t nsid;
|
uint32_t nsid;
|
||||||
|
|
||||||
for (nsid = spdk_nvme_ctrlr_get_first_active_ns(nvme_bdev_ctrlr->ctrlr);
|
for (nsid = spdk_nvme_ctrlr_get_first_active_ns(nvme_bdev_ctrlr->ctrlr);
|
||||||
@ -1710,14 +1710,14 @@ nvme_ctrlr_create_bdevs(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr)
|
|||||||
rc = nvme_ctrlr_create_bdev(nvme_bdev_ctrlr, ns);
|
rc = nvme_ctrlr_create_bdev(nvme_bdev_ctrlr, ns);
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
ns->active = true;
|
ns->active = true;
|
||||||
bdev_created++;
|
bdevs_created++;
|
||||||
} else {
|
} else {
|
||||||
memset(ns, 0, sizeof(*ns));
|
memset(ns, 0, sizeof(*ns));
|
||||||
SPDK_NOTICELOG("Failed to create bdev for namespace %u of %s\n", nsid, nvme_bdev_ctrlr->name);
|
SPDK_NOTICELOG("Failed to create bdev for namespace %u of %s\n", nsid, nvme_bdev_ctrlr->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bdev_created == 0) {
|
if (bdevs_created == 0) {
|
||||||
SPDK_NOTICELOG("No bdev is created for NVMe controller %s\n", nvme_bdev_ctrlr->name);
|
SPDK_NOTICELOG("No bdev is created for NVMe controller %s\n", nvme_bdev_ctrlr->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user