bdev/nvme: Call bdev_nvme_create_bdevs only for non-OCSSD NVMe

OCSSD NVMe will use separate RPC call to create bdevs
so don't call bdev_nvme_create_bdevs for it.
Additionally change bdev_nvme_create_bdevs arguments
to take nvme_async_probe_ctx structure to simplify
future changes.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I07ad8034058d8b3a0c78627db1fd0ba3db5a211b

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468223
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Maciej Szwed 2019-09-12 12:30:00 +02:00 committed by Jim Harris
parent e4f9509be5
commit a1b9707ceb

View File

@ -1245,9 +1245,11 @@ connect_attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
goto end;
}
rc = bdev_nvme_create_bdevs(ctx);
if (rc) {
SPDK_ERRLOG("Failed to create bdevs\n");
if (!spdk_nvme_ctrlr_is_ocssd_supported(ctrlr)) {
rc = bdev_nvme_create_bdevs(ctx);
if (rc) {
SPDK_ERRLOG("Failed to create bdevs\n");
}
}
end: