Skip to content

Commit

Permalink
bdev_nvme: allow bdev_nvme_create() to take a NULL names arg
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: Ia386d034df2c2d5a60f9aa18338ba415ec03d763
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10689
Tested-by: SPDK CI Jenkins <[email protected]>
Community-CI: Broadcom CI <[email protected]>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <[email protected]>
Reviewed-by: Aleksey Marchuk <[email protected]>
  • Loading branch information
jimharris authored and tomzawadzki committed Dec 21, 2021
1 parent 986f74a commit ef8f297
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions module/bdev/nvme/bdev_nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ef8f297

Please sign in to comment.