From d8ee1237829e452cd812ad754d3d15ec0b459896 Mon Sep 17 00:00:00 2001 From: Maciej Szwed Date: Tue, 5 Mar 2019 13:35:29 +0100 Subject: [PATCH] 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: Maciej Szwed Change-Id: I9a283143a11090032b74684611403637bc6605a3 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447056 Tested-by: SPDK CI Jenkins Reviewed-by: Pawel Wodkowski Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto Reviewed-by: Darek Stojaczyk --- lib/bdev/nvme/bdev_nvme.c | 10 +++++----- lib/bdev/nvme/bdev_nvme.h | 8 ++++---- lib/bdev/nvme/bdev_nvme_rpc.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/bdev/nvme/bdev_nvme.c b/lib/bdev/nvme/bdev_nvme.c index f54c27b8b..78f42f545 100644 --- a/lib/bdev/nvme/bdev_nvme.c +++ b/lib/bdev/nvme/bdev_nvme.c @@ -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", diff --git a/lib/bdev/nvme/bdev_nvme.h b/lib/bdev/nvme/bdev_nvme.h index 327d5042a..060431e5b 100644 --- a/lib/bdev/nvme/bdev_nvme.h +++ b/lib/bdev/nvme/bdev_nvme.h @@ -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, - struct spdk_json_write_ctx *w); +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); diff --git a/lib/bdev/nvme/bdev_nvme_rpc.c b/lib/bdev/nvme/bdev_nvme_rpc.c index 9b5a88b24..31f744570 100644 --- a/lib/bdev/nvme/bdev_nvme_rpc.c +++ b/lib/bdev/nvme/bdev_nvme_rpc.c @@ -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); } }