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 <maciej.szwed@intel.com>
Change-Id: I9a283143a11090032b74684611403637bc6605a3

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447056
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Maciej Szwed 2019-03-05 13:35:29 +01:00 committed by Darek Stojaczyk
parent 84ee3a62c7
commit d8ee123782
3 changed files with 11 additions and 11 deletions

View File

@ -151,13 +151,13 @@ spdk_bdev_nvme_get_io_qpair(struct spdk_io_channel *ctrlr_io_ch)
} }
struct nvme_bdev_ctrlr * struct nvme_bdev_ctrlr *
spdk_bdev_nvme_first_ctrlr(void) nvme_bdev_first_ctrlr(void)
{ {
return TAILQ_FIRST(&g_nvme_bdev_ctrlrs); return TAILQ_FIRST(&g_nvme_bdev_ctrlrs);
} }
struct nvme_bdev_ctrlr * 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); return TAILQ_NEXT(prev, tailq);
} }
@ -563,7 +563,7 @@ bdev_nvme_get_io_channel(void *ctx)
} }
void 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 *trtype_str;
const char *adrfam_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_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); 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_object_begin(w, "params");
spdk_json_write_named_string(w, "name", nvme_bdev_ctrlr->name); 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", spdk_json_write_named_bool(w, "prchk_reftag",
(nvme_bdev_ctrlr->prchk_flags & SPDK_NVME_IO_FLAGS_PRCHK_REFTAG) != 0); (nvme_bdev_ctrlr->prchk_flags & SPDK_NVME_IO_FLAGS_PRCHK_REFTAG) != 0);
spdk_json_write_named_bool(w, "prchk_guard", spdk_json_write_named_bool(w, "prchk_guard",

View File

@ -53,12 +53,12 @@ struct spdk_bdev_nvme_opts {
uint64_t nvme_adminq_poll_period_us; 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_json_write_ctx *w);
struct spdk_nvme_qpair *spdk_bdev_nvme_get_io_qpair(struct spdk_io_channel *ctrlr_io_ch); 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 *nvme_bdev_first_ctrlr(void);
struct nvme_bdev_ctrlr *spdk_bdev_nvme_next_ctrlr(struct nvme_bdev_ctrlr *prev); 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); 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_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); int spdk_bdev_nvme_set_hotplug(bool enabled, uint64_t period_us, spdk_msg_fn cb, void *cb_ctx);

View File

@ -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_string(w, "name", nvme_bdev_ctrlr->name);
spdk_json_write_named_object_begin(w, "trid"); 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);
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) { if (ctrlr != NULL) {
spdk_rpc_dump_nvme_controller_info(w, ctrlr); spdk_rpc_dump_nvme_controller_info(w, ctrlr);
} else { } 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); spdk_rpc_dump_nvme_controller_info(w, ctrlr);
} }
} }