Commit d8ee1237 authored by Maciej Szwed's avatar Maciej Szwed Committed by Darek Stojaczyk
Browse files

bdev/nvme: Rename non-public API NVMe bdev functions



Renaming functions to make it clear they are not part
of the public API.

Signed-off-by: default avatarMaciej Szwed <maciej.szwed@intel.com>
Change-Id: I9a283143a11090032b74684611403637bc6605a3

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
parent 84ee3a62
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -151,13 +151,13 @@ spdk_bdev_nvme_get_io_qpair(struct spdk_io_channel *ctrlr_io_ch)
}

struct nvme_bdev_ctrlr *
spdk_bdev_nvme_first_ctrlr(void)
nvme_bdev_first_ctrlr(void)
{
	return TAILQ_FIRST(&g_nvme_bdev_ctrlrs);
}

struct nvme_bdev_ctrlr *
spdk_bdev_nvme_next_ctrlr(struct nvme_bdev_ctrlr *prev)
nvme_bdev_next_ctrlr(struct nvme_bdev_ctrlr *prev)
{
	return TAILQ_NEXT(prev, tailq);
}
@@ -563,7 +563,7 @@ bdev_nvme_get_io_channel(void *ctx)
}

void
spdk_bdev_nvme_dump_trid_json(struct spdk_nvme_transport_id *trid, struct spdk_json_write_ctx *w)
nvme_bdev_dump_trid_json(struct spdk_nvme_transport_id *trid, struct spdk_json_write_ctx *w)
{
	const char *trtype_str;
	const char *adrfam_str;
@@ -615,7 +615,7 @@ bdev_nvme_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)

	spdk_json_write_named_object_begin(w, "trid");

	spdk_bdev_nvme_dump_trid_json(&nvme_bdev_ctrlr->trid, w);
	nvme_bdev_dump_trid_json(&nvme_bdev_ctrlr->trid, w);

	spdk_json_write_object_end(w);

@@ -2050,7 +2050,7 @@ bdev_nvme_config_json(struct spdk_json_write_ctx *w)

		spdk_json_write_named_object_begin(w, "params");
		spdk_json_write_named_string(w, "name", nvme_bdev_ctrlr->name);
		spdk_bdev_nvme_dump_trid_json(trid, w);
		nvme_bdev_dump_trid_json(trid, w);
		spdk_json_write_named_bool(w, "prchk_reftag",
					   (nvme_bdev_ctrlr->prchk_flags & SPDK_NVME_IO_FLAGS_PRCHK_REFTAG) != 0);
		spdk_json_write_named_bool(w, "prchk_guard",
+4 −4
Original line number Diff line number Diff line
@@ -53,12 +53,12 @@ struct spdk_bdev_nvme_opts {
	uint64_t nvme_adminq_poll_period_us;
};

void spdk_bdev_nvme_dump_trid_json(struct spdk_nvme_transport_id *trid,
void nvme_bdev_dump_trid_json(struct spdk_nvme_transport_id *trid,
			      struct spdk_json_write_ctx *w);

struct spdk_nvme_qpair *spdk_bdev_nvme_get_io_qpair(struct spdk_io_channel *ctrlr_io_ch);
struct nvme_bdev_ctrlr *spdk_bdev_nvme_first_ctrlr(void);
struct nvme_bdev_ctrlr *spdk_bdev_nvme_next_ctrlr(struct nvme_bdev_ctrlr *prev);
struct nvme_bdev_ctrlr *nvme_bdev_first_ctrlr(void);
struct nvme_bdev_ctrlr *nvme_bdev_next_ctrlr(struct nvme_bdev_ctrlr *prev);
void spdk_bdev_nvme_get_opts(struct spdk_bdev_nvme_opts *opts);
int spdk_bdev_nvme_set_opts(const struct spdk_bdev_nvme_opts *opts);
int spdk_bdev_nvme_set_hotplug(bool enabled, uint64_t period_us, spdk_msg_fn cb, void *cb_ctx);
+2 −2
Original line number Diff line number Diff line
@@ -311,7 +311,7 @@ spdk_rpc_dump_nvme_controller_info(struct spdk_json_write_ctx *w,
	spdk_json_write_named_string(w, "name", nvme_bdev_ctrlr->name);

	spdk_json_write_named_object_begin(w, "trid");
	spdk_bdev_nvme_dump_trid_json(trid, w);
	nvme_bdev_dump_trid_json(trid, w);
	spdk_json_write_object_end(w);

	spdk_json_write_object_end(w);
@@ -365,7 +365,7 @@ spdk_rpc_get_nvme_controllers(struct spdk_jsonrpc_request *request,
	if (ctrlr != NULL) {
		spdk_rpc_dump_nvme_controller_info(w, ctrlr);
	} else {
		for (ctrlr = spdk_bdev_nvme_first_ctrlr(); ctrlr; ctrlr = spdk_bdev_nvme_next_ctrlr(ctrlr))  {
		for (ctrlr = nvme_bdev_first_ctrlr(); ctrlr; ctrlr = nvme_bdev_next_ctrlr(ctrlr))  {
			spdk_rpc_dump_nvme_controller_info(w, ctrlr);
		}
	}