bdev_nvme: allow bdev_nvme_create() to take a NULL names arg
We will want to use bdev_nvme_create() to attach to controllers identified through discovery. In this case, we won't be reporting bdev names back to an RPC caller, so there's no need to allocate an array of names to be filled out since they won't be used. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ia386d034df2c2d5a60f9aa18338ba415ec03d763 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10689 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
986f74aead
commit
ef8f297ba4
@ -3484,6 +3484,11 @@ nvme_ctrlr_populate_namespaces_done(struct nvme_ctrlr *nvme_ctrlr,
|
||||
|
||||
assert(nvme_ctrlr != NULL);
|
||||
|
||||
if (ctx->names == NULL) {
|
||||
populate_namespaces_cb(ctx, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Report the new bdevs that were created in this call.
|
||||
* There can be more than one bdev per NVMe controller.
|
||||
|
Loading…
Reference in New Issue
Block a user