From 076821454d52ab53d6e8f934eeb927a64d5a2d07 Mon Sep 17 00:00:00 2001 From: Mike Carlin Date: Wed, 22 Jan 2020 15:35:05 -0800 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482449 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Reviewed-by: Ben Walker --- module/bdev/nvme/bdev_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bdev/nvme/bdev_nvme.c b/module/bdev/nvme/bdev_nvme.c index b108060ac..3810f2380 100644 --- a/module/bdev/nvme/bdev_nvme.c +++ b/module/bdev/nvme/bdev_nvme.c @@ -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,