lib/nvme: fix hotplug trtype 256 not available

There was an issue in the hotplug poller where it would fail to
probe the added/removed nvme pcie devices due to an error trying
to find the PCIe transport type. This happened because the
`struct spdk_nvme_transport_id` needs to have its trstring filled in
after a change was made to get transports by name to allow for custom
transport types. This change fills in the trstring so that downstream
checks correctly pass.

Fixes #1159

Change-Id: I35d2834f3ba58a8e6f8e91d290c1f4cb9c158e5a
Signed-off-by: Mike Carlin <mikefcarlin@protonmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482449
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Mike Carlin 2020-01-22 15:35:05 -08:00 committed by Jim Harris
parent 85fcc49fd4
commit 076821454d

View File

@ -1354,7 +1354,7 @@ bdev_nvme_hotplug(void *arg)
if (!g_hotplug_probe_ctx) {
memset(&trid_pcie, 0, sizeof(trid_pcie));
trid_pcie.trtype = SPDK_NVME_TRANSPORT_PCIE;
spdk_nvme_trid_populate_transport(&trid_pcie, SPDK_NVME_TRANSPORT_PCIE);
g_hotplug_probe_ctx = spdk_nvme_probe_async(&trid_pcie, NULL,
hotplug_probe_cb,