bdev/nvme: Change nvme_async_probe_ctx->count type to uint32_t

This also requires change of type for count field
in rpc_bdev_nvme_attach_controller_ctx structure
and argument type in spdk_bdev_nvme_create function.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470135
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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-10-02 12:40:06 +02:00 committed by Jim Harris
parent a1b9707ceb
commit 05e97101b2
4 changed files with 7 additions and 5 deletions

View File

@ -1218,7 +1218,7 @@ bdev_nvme_create_bdevs(struct nvme_async_probe_ctx *ctx)
ctx->names[j] = nvme_bdev->disk.name;
j++;
} else {
SPDK_ERRLOG("Maximum number of namespaces supported per NVMe controller is %zu. Unable to return all names of created bdevs\n",
SPDK_ERRLOG("Maximum number of namespaces supported per NVMe controller is %du. Unable to return all names of created bdevs\n",
*ctx->count);
return -1;
}
@ -1278,7 +1278,8 @@ int
spdk_bdev_nvme_create(struct spdk_nvme_transport_id *trid,
struct spdk_nvme_host_id *hostid,
const char *base_name,
const char **names, size_t *count,
const char **names,
uint32_t *count,
const char *hostnqn,
uint32_t prchk_flags,
spdk_bdev_create_nvme_fn cb_fn,

View File

@ -69,7 +69,8 @@ int spdk_bdev_nvme_set_hotplug(bool enabled, uint64_t period_us, spdk_msg_fn cb,
int spdk_bdev_nvme_create(struct spdk_nvme_transport_id *trid,
struct spdk_nvme_host_id *hostid,
const char *base_name,
const char **names, size_t *count,
const char **names,
uint32_t *count,
const char *hostnqn,
uint32_t prchk_flags,
spdk_bdev_create_nvme_fn cb_fn,

View File

@ -210,7 +210,7 @@ static const struct spdk_json_object_decoder rpc_bdev_nvme_attach_controller_dec
struct rpc_bdev_nvme_attach_controller_ctx {
struct rpc_bdev_nvme_attach_controller req;
size_t count;
uint32_t count;
const char *names[NVME_MAX_BDEVS_PER_RPC];
struct spdk_jsonrpc_request *request;
};

View File

@ -87,7 +87,7 @@ struct nvme_async_probe_ctx {
struct spdk_nvme_probe_ctx *probe_ctx;
const char *base_name;
const char **names;
size_t *count;
uint32_t *count;
uint32_t prchk_flags;
struct spdk_poller *poller;
struct spdk_nvme_transport_id trid;