From 696c6bc27e980e82533ff56606312001d7761f7c Mon Sep 17 00:00:00 2001 From: Aneesh Pachilangottil Date: Thu, 3 May 2018 13:15:28 -0400 Subject: [PATCH] bdev/nvme: Increase the number of namespaces supported per NVMe device from 32 to 128 When executing construct_nvme_bdev RPC method, if the NVMe SSD has more than 32 namespace in it, then the response is displayed as invalid. Increased the maximum number of namespaces supported per NVMe device from 32 to 128. Change-Id: I79491af662b8d2059ad3e0920040a44a82d50064 Signed-off-by: Aneesh Pachilangottil Reviewed-on: https://review.gerrithub.io/409926 Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker Tested-by: SPDK Automated Test System --- lib/bdev/nvme/bdev_nvme.c | 3 ++- lib/bdev/nvme/bdev_nvme_rpc.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/bdev/nvme/bdev_nvme.c b/lib/bdev/nvme/bdev_nvme.c index 7995416368..9513317adc 100644 --- a/lib/bdev/nvme/bdev_nvme.c +++ b/lib/bdev/nvme/bdev_nvme.c @@ -949,7 +949,8 @@ spdk_bdev_nvme_create(struct spdk_nvme_transport_id *trid, names[j] = nvme_bdev->disk.name; j++; } else { - SPDK_ERRLOG("Unable to return all names of created bdevs\n"); + SPDK_ERRLOG("Maximum number of namespaces supported per NVMe controller is %zu. Unable to return all names of created bdevs\n", + *count); free(probe_ctx); return -1; } diff --git a/lib/bdev/nvme/bdev_nvme_rpc.c b/lib/bdev/nvme/bdev_nvme_rpc.c index 7b4736a9d8..999c010dad 100644 --- a/lib/bdev/nvme/bdev_nvme_rpc.c +++ b/lib/bdev/nvme/bdev_nvme_rpc.c @@ -79,7 +79,7 @@ static const struct spdk_json_object_decoder rpc_construct_nvme_decoders[] = { {"subnqn", offsetof(struct rpc_construct_nvme, subnqn), spdk_json_decode_string, true}, }; -#define NVME_MAX_BDEVS_PER_RPC 32 +#define NVME_MAX_BDEVS_PER_RPC 128 static void spdk_rpc_construct_nvme_bdev(struct spdk_jsonrpc_request *request,