misc/rpc: rename some C functions of rpc methods

Traditionally, The C function name of rpc method "method_name" will be
"spdk_rpc_method_name", so make these function names consistent with
others. No behaviours changed.

Change-Id: Iac5396d4860bdbd78cba9031b4b6358161ec779b
Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453197
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
wuzhouhui 2019-05-06 11:54:05 +08:00 committed by Darek Stojaczyk
parent 4460761f22
commit 0acc20ab10
9 changed files with 55 additions and 52 deletions

View File

@ -965,8 +965,8 @@ invalid:
}
static void
spdk_rpc_set_ro_lvol_bdev(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_set_read_only_lvol_bdev(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct rpc_set_ro_lvol_bdev req = {};
struct spdk_bdev *bdev;
@ -1013,7 +1013,7 @@ invalid:
free_rpc_set_ro_lvol_bdev(&req);
}
SPDK_RPC_REGISTER("set_read_only_lvol_bdev", spdk_rpc_set_ro_lvol_bdev, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("set_read_only_lvol_bdev", spdk_rpc_set_read_only_lvol_bdev, SPDK_RPC_RUNTIME)
struct rpc_destroy_lvol_bdev {
char *name;

View File

@ -425,8 +425,8 @@ static const struct spdk_json_object_decoder rpc_delete_nvme_decoders[] = {
};
static void
spdk_rpc_delete_nvme_ctrlr(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_delete_nvme_controller(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct rpc_delete_nvme req = {NULL};
struct spdk_json_write_ctx *w;
@ -460,7 +460,7 @@ invalid:
spdk_strerror(-rc));
free_rpc_delete_nvme(&req);
}
SPDK_RPC_REGISTER("delete_nvme_controller", spdk_rpc_delete_nvme_ctrlr, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("delete_nvme_controller", spdk_rpc_delete_nvme_controller, SPDK_RPC_RUNTIME)
struct rpc_apply_firmware {
char *filename;

View File

@ -117,8 +117,8 @@ static const struct spdk_json_object_decoder rpc_destruct_split_decoders[] = {
};
static void
spdk_rpc_destruct_split(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_destruct_split_vbdev(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct rpc_destruct_split req = {};
struct spdk_json_write_ctx *w;
@ -148,4 +148,4 @@ spdk_rpc_destruct_split(struct spdk_jsonrpc_request *request,
out:
free(req.base_bdev);
}
SPDK_RPC_REGISTER("destruct_split_vbdev", spdk_rpc_destruct_split, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("destruct_split_vbdev", spdk_rpc_destruct_split_vbdev, SPDK_RPC_RUNTIME)

View File

@ -187,8 +187,8 @@ spdk_rpc_create_virtio_dev_cb(void *ctx, int result, struct spdk_bdev **bdevs, s
}
static void
spdk_rpc_create_virtio_dev(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_construct_virtio_dev(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct rpc_construct_virtio_dev *req;
struct spdk_bdev *bdev;
@ -271,4 +271,4 @@ spdk_rpc_create_virtio_dev(struct spdk_jsonrpc_request *request,
invalid:
free_rpc_construct_virtio_dev(req);
}
SPDK_RPC_REGISTER("construct_virtio_dev", spdk_rpc_create_virtio_dev, SPDK_RPC_RUNTIME);
SPDK_RPC_REGISTER("construct_virtio_dev", spdk_rpc_construct_virtio_dev, SPDK_RPC_RUNTIME);

View File

@ -76,7 +76,7 @@ static const struct spdk_json_object_decoder rpc_copy_engine_ioat_decoder[] = {
};
static void
spdk_rpc_scan_copy_engine_ioat(struct spdk_jsonrpc_request *request,
spdk_rpc_scan_ioat_copy_engine(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct rpc_copy_engine_ioat req = {};
@ -115,4 +115,4 @@ spdk_rpc_scan_copy_engine_ioat(struct spdk_jsonrpc_request *request,
spdk_json_write_bool(w, true);
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("scan_ioat_copy_engine", spdk_rpc_scan_copy_engine_ioat, SPDK_RPC_STARTUP)
SPDK_RPC_REGISTER("scan_ioat_copy_engine", spdk_rpc_scan_ioat_copy_engine, SPDK_RPC_STARTUP)

View File

@ -50,7 +50,7 @@ static const struct spdk_json_object_decoder rpc_set_bdev_opts_decoders[] = {
};
static void
spdk_rpc_set_bdev_opts(struct spdk_jsonrpc_request *request, const struct spdk_json_val *params)
spdk_rpc_set_bdev_options(struct spdk_jsonrpc_request *request, const struct spdk_json_val *params)
{
struct spdk_rpc_set_bdev_opts rpc_opts;
struct spdk_bdev_opts bdev_opts;
@ -94,4 +94,4 @@ spdk_rpc_set_bdev_opts(struct spdk_jsonrpc_request *request, const struct spdk_j
spdk_json_write_bool(w, true);
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("set_bdev_options", spdk_rpc_set_bdev_opts, SPDK_RPC_STARTUP)
SPDK_RPC_REGISTER("set_bdev_options", spdk_rpc_set_bdev_options, SPDK_RPC_STARTUP)

View File

@ -66,8 +66,8 @@ static const struct spdk_json_object_decoder rpc_set_iscsi_opts_decoders[] = {
};
static void
spdk_rpc_iscsi_set_opts(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_set_iscsi_options(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct spdk_iscsi_opts *opts;
struct spdk_json_write_ctx *w;
@ -116,4 +116,4 @@ spdk_rpc_iscsi_set_opts(struct spdk_jsonrpc_request *request,
spdk_json_write_bool(w, true);
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("set_iscsi_options", spdk_rpc_iscsi_set_opts, SPDK_RPC_STARTUP)
SPDK_RPC_REGISTER("set_iscsi_options", spdk_rpc_set_iscsi_options, SPDK_RPC_STARTUP)

View File

@ -683,8 +683,8 @@ rpc_listen_address_to_trid(const struct rpc_listen_address *address,
}
static void
nvmf_rpc_subsystem_add_listener(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_nvmf_subsystem_add_listener(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct nvmf_rpc_listener_ctx *ctx;
struct spdk_nvmf_subsystem *subsystem;
@ -731,11 +731,12 @@ nvmf_rpc_subsystem_add_listener(struct spdk_jsonrpc_request *request,
return;
}
}
SPDK_RPC_REGISTER("nvmf_subsystem_add_listener", nvmf_rpc_subsystem_add_listener, SPDK_RPC_RUNTIME);
SPDK_RPC_REGISTER("nvmf_subsystem_add_listener", spdk_rpc_nvmf_subsystem_add_listener,
SPDK_RPC_RUNTIME);
static void
nvmf_rpc_subsystem_remove_listener(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_nvmf_subsystem_remove_listener(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct nvmf_rpc_listener_ctx *ctx;
struct spdk_nvmf_subsystem *subsystem;
@ -783,7 +784,7 @@ nvmf_rpc_subsystem_remove_listener(struct spdk_jsonrpc_request *request,
}
}
SPDK_RPC_REGISTER("nvmf_subsystem_remove_listener", nvmf_rpc_subsystem_remove_listener,
SPDK_RPC_REGISTER("nvmf_subsystem_remove_listener", spdk_rpc_nvmf_subsystem_remove_listener,
SPDK_RPC_RUNTIME);
struct spdk_nvmf_ns_params {
@ -912,8 +913,8 @@ resume:
}
static void
nvmf_rpc_subsystem_add_ns(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_nvmf_subsystem_add_ns(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct nvmf_rpc_ns_ctx *ctx;
struct spdk_nvmf_subsystem *subsystem;
@ -950,7 +951,7 @@ nvmf_rpc_subsystem_add_ns(struct spdk_jsonrpc_request *request,
return;
}
}
SPDK_RPC_REGISTER("nvmf_subsystem_add_ns", nvmf_rpc_subsystem_add_ns, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("nvmf_subsystem_add_ns", spdk_rpc_nvmf_subsystem_add_ns, SPDK_RPC_RUNTIME)
struct nvmf_rpc_remove_ns_ctx {
char *nqn;
@ -1035,8 +1036,8 @@ nvmf_rpc_remove_ns_paused(struct spdk_nvmf_subsystem *subsystem,
}
static void
nvmf_rpc_subsystem_remove_ns(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_nvmf_subsystem_remove_ns(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct nvmf_rpc_remove_ns_ctx *ctx;
struct spdk_nvmf_subsystem *subsystem;
@ -1073,7 +1074,7 @@ nvmf_rpc_subsystem_remove_ns(struct spdk_jsonrpc_request *request,
return;
}
}
SPDK_RPC_REGISTER("nvmf_subsystem_remove_ns", nvmf_rpc_subsystem_remove_ns, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("nvmf_subsystem_remove_ns", spdk_rpc_nvmf_subsystem_remove_ns, SPDK_RPC_RUNTIME)
enum nvmf_rpc_host_op {
NVMF_RPC_HOST_ADD,
@ -1166,8 +1167,8 @@ nvmf_rpc_host_paused(struct spdk_nvmf_subsystem *subsystem,
}
static void
nvmf_rpc_subsystem_add_host(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_nvmf_subsystem_add_host(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct nvmf_rpc_host_ctx *ctx;
struct spdk_nvmf_subsystem *subsystem;
@ -1205,11 +1206,11 @@ nvmf_rpc_subsystem_add_host(struct spdk_jsonrpc_request *request,
return;
}
}
SPDK_RPC_REGISTER("nvmf_subsystem_add_host", nvmf_rpc_subsystem_add_host, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("nvmf_subsystem_add_host", spdk_rpc_nvmf_subsystem_add_host, SPDK_RPC_RUNTIME)
static void
nvmf_rpc_subsystem_remove_host(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_nvmf_subsystem_remove_host(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct nvmf_rpc_host_ctx *ctx;
struct spdk_nvmf_subsystem *subsystem;
@ -1247,7 +1248,8 @@ nvmf_rpc_subsystem_remove_host(struct spdk_jsonrpc_request *request,
return;
}
}
SPDK_RPC_REGISTER("nvmf_subsystem_remove_host", nvmf_rpc_subsystem_remove_host, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("nvmf_subsystem_remove_host", spdk_rpc_nvmf_subsystem_remove_host,
SPDK_RPC_RUNTIME)
static const struct spdk_json_object_decoder nvmf_rpc_subsystem_any_host_decoder[] = {
@ -1256,8 +1258,8 @@ static const struct spdk_json_object_decoder nvmf_rpc_subsystem_any_host_decoder
};
static void
nvmf_rpc_subsystem_allow_any_host(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_nvmf_subsystem_allow_any_host(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct nvmf_rpc_host_ctx *ctx;
struct spdk_nvmf_subsystem *subsystem;
@ -1295,7 +1297,7 @@ nvmf_rpc_subsystem_allow_any_host(struct spdk_jsonrpc_request *request,
return;
}
}
SPDK_RPC_REGISTER("nvmf_subsystem_allow_any_host", nvmf_rpc_subsystem_allow_any_host,
SPDK_RPC_REGISTER("nvmf_subsystem_allow_any_host", spdk_rpc_nvmf_subsystem_allow_any_host,
SPDK_RPC_RUNTIME)
static const struct spdk_json_object_decoder nvmf_rpc_subsystem_tgt_opts_decoder[] = {
@ -1303,8 +1305,8 @@ static const struct spdk_json_object_decoder nvmf_rpc_subsystem_tgt_opts_decoder
};
static void
nvmf_rpc_subsystem_set_tgt_max_subsystems(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_set_nvmf_target_max_subsystems(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct spdk_json_write_ctx *w;
uint32_t max_subsystems = 0;
@ -1336,7 +1338,7 @@ nvmf_rpc_subsystem_set_tgt_max_subsystems(struct spdk_jsonrpc_request *request,
spdk_json_write_bool(w, true);
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("set_nvmf_target_max_subsystems", nvmf_rpc_subsystem_set_tgt_max_subsystems,
SPDK_RPC_REGISTER("set_nvmf_target_max_subsystems", spdk_rpc_set_nvmf_target_max_subsystems,
SPDK_RPC_STARTUP)
static int decode_conn_sched(const struct spdk_json_val *val, void *out)
@ -1361,7 +1363,7 @@ static const struct spdk_json_object_decoder nvmf_rpc_subsystem_tgt_conf_decoder
};
static void
nvmf_rpc_subsystem_set_tgt_conf(struct spdk_jsonrpc_request *request,
spdk_rpc_set_nvmf_target_config(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct spdk_nvmf_tgt_conf *conf;
@ -1406,7 +1408,7 @@ nvmf_rpc_subsystem_set_tgt_conf(struct spdk_jsonrpc_request *request,
spdk_json_write_bool(w, true);
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("set_nvmf_target_config", nvmf_rpc_subsystem_set_tgt_conf, SPDK_RPC_STARTUP)
SPDK_RPC_REGISTER("set_nvmf_target_config", spdk_rpc_set_nvmf_target_config, SPDK_RPC_STARTUP)
struct nvmf_rpc_create_transport_ctx {
char *trtype;
@ -1493,8 +1495,8 @@ nvmf_rpc_tgt_add_transport_done(void *cb_arg, int status)
}
static void
nvmf_rpc_create_transport(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_nvmf_create_transport(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct nvmf_rpc_create_transport_ctx *ctx;
enum spdk_nvme_transport_type trtype;
@ -1570,7 +1572,7 @@ nvmf_rpc_create_transport(struct spdk_jsonrpc_request *request,
spdk_nvmf_tgt_add_transport(g_spdk_nvmf_tgt, transport, nvmf_rpc_tgt_add_transport_done, ctx);
}
SPDK_RPC_REGISTER("nvmf_create_transport", nvmf_rpc_create_transport, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("nvmf_create_transport", spdk_rpc_nvmf_create_transport, SPDK_RPC_RUNTIME)
static void
dump_nvmf_transport(struct spdk_json_write_ctx *w, struct spdk_nvmf_transport *transport)
@ -1598,7 +1600,7 @@ dump_nvmf_transport(struct spdk_json_write_ctx *w, struct spdk_nvmf_transport *t
}
static void
nvmf_rpc_get_nvmf_transports(struct spdk_jsonrpc_request *request,
spdk_rpc_get_nvmf_transports(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct spdk_json_write_ctx *w;
@ -1624,4 +1626,4 @@ nvmf_rpc_get_nvmf_transports(struct spdk_jsonrpc_request *request,
spdk_json_write_array_end(w);
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("get_nvmf_transports", nvmf_rpc_get_nvmf_transports, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("get_nvmf_transports", spdk_rpc_get_nvmf_transports, SPDK_RPC_RUNTIME)

View File

@ -384,7 +384,7 @@ spdk_rpc_get_rpc_methods(struct spdk_jsonrpc_request *request,
SPDK_RPC_REGISTER("get_rpc_methods", spdk_rpc_get_rpc_methods, SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
static void
spdk_rpc_get_version(struct spdk_jsonrpc_request *request, const struct spdk_json_val *params)
spdk_rpc_get_spdk_version(struct spdk_jsonrpc_request *request, const struct spdk_json_val *params)
{
struct spdk_json_write_ctx *w;
@ -416,4 +416,5 @@ spdk_rpc_get_version(struct spdk_jsonrpc_request *request, const struct spdk_jso
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("get_spdk_version", spdk_rpc_get_version, SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("get_spdk_version", spdk_rpc_get_spdk_version,
SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)