Commit 05e97101 authored by Maciej Szwed's avatar Maciej Szwed Committed by Jim Harris
Browse files

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: default avatarMaciej Szwed <maciej.szwed@intel.com>
Change-Id: Ifc679558b0744ada021f5ce367beb83b35f30b3a

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470135


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent a1b9707c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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,
+2 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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;
};
+1 −1
Original line number Diff line number Diff line
@@ -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;