From 321d28ef02b7fe72fe046507264cb5f1121900d4 Mon Sep 17 00:00:00 2001 From: Cunyin Chang Date: Mon, 27 Mar 2017 15:04:00 +0800 Subject: [PATCH] bdev/nvme: Shorten the name of hot inserted NVMe device. Make sure the name will not exceed the length of SPDK_BDEV_MAX_NAME_LENGTH. Change-Id: I33a3f10c836e650fdcb578c7d9e58169d9bb766a Signed-off-by: Cunyin Chang --- lib/bdev/nvme/blockdev_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bdev/nvme/blockdev_nvme.c b/lib/bdev/nvme/blockdev_nvme.c index 8485e7d5d1..974696b9f8 100644 --- a/lib/bdev/nvme/blockdev_nvme.c +++ b/lib/bdev/nvme/blockdev_nvme.c @@ -589,7 +589,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, } } } else { - name = spdk_sprintf_alloc("HotInsertNvme%d", g_hot_insert_nvme_controller_index++); + name = spdk_sprintf_alloc("HotInNvme%d", g_hot_insert_nvme_controller_index++); } if (!name) { SPDK_ERRLOG("Failed to assign name to NVMe device\n");