bdev/nvme: move code to nvme_ctrlr_populate_namespaces_done
This is in preparation for making this code path asynchronous. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ifd0ca2a997f5d89307deb7ae686480544fb73140 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475922 Tested-by: SPDK CI Jenkins <sys_sgci@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: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
d3726b6e19
commit
743292aa0f
@ -1349,7 +1349,7 @@ populate_namespaces_cb(struct nvme_async_probe_ctx *ctx, size_t count, int rc)
|
||||
}
|
||||
|
||||
static void
|
||||
bdev_nvme_populate_namespaces(struct nvme_async_probe_ctx *ctx)
|
||||
nvme_ctrlr_populate_namespaces_done(struct nvme_async_probe_ctx *ctx)
|
||||
{
|
||||
struct nvme_bdev_ctrlr *nvme_bdev_ctrlr;
|
||||
struct nvme_bdev_ns *ns;
|
||||
@ -1358,9 +1358,6 @@ bdev_nvme_populate_namespaces(struct nvme_async_probe_ctx *ctx)
|
||||
size_t j;
|
||||
|
||||
nvme_bdev_ctrlr = nvme_bdev_ctrlr_get(&ctx->trid);
|
||||
assert(nvme_bdev_ctrlr != NULL);
|
||||
|
||||
nvme_ctrlr_populate_namespaces(nvme_bdev_ctrlr, ctx);
|
||||
|
||||
/*
|
||||
* Report the new bdevs that were created in this call.
|
||||
@ -1390,6 +1387,18 @@ bdev_nvme_populate_namespaces(struct nvme_async_probe_ctx *ctx)
|
||||
populate_namespaces_cb(ctx, j, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
bdev_nvme_populate_namespaces(struct nvme_async_probe_ctx *ctx)
|
||||
{
|
||||
struct nvme_bdev_ctrlr *nvme_bdev_ctrlr;
|
||||
|
||||
nvme_bdev_ctrlr = nvme_bdev_ctrlr_get(&ctx->trid);
|
||||
assert(nvme_bdev_ctrlr != NULL);
|
||||
|
||||
nvme_ctrlr_populate_namespaces(nvme_bdev_ctrlr, ctx);
|
||||
nvme_ctrlr_populate_namespaces_done(ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
connect_attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_ctrlr_opts *opts)
|
||||
|
Loading…
Reference in New Issue
Block a user