RPC: rename set_bdev_options to bdev_set_options
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com> Change-Id: I02cd87c9e13db6f237db15ccb15c19a63ad4568d Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468948 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
85ab05d32b
commit
8e052bf41b
@ -271,7 +271,7 @@ Example response:
|
||||
"iscsi_create_initiator_group",
|
||||
"iscsi_get_initiator_groups",
|
||||
"iscsi_set_options",
|
||||
"set_bdev_options",
|
||||
"bdev_set_options",
|
||||
"bdev_set_qos_limit",
|
||||
"bdev_get_bdevs",
|
||||
"bdev_get_iostat",
|
||||
@ -528,7 +528,7 @@ Example response:
|
||||
|
||||
# Block Device Abstraction Layer {#jsonrpc_components_bdev}
|
||||
|
||||
## set_bdev_options {#rpc_set_bdev_options}
|
||||
## bdev_set_options {#rpc_bdev_set_options}
|
||||
|
||||
Set global parameters for the block device (bdev) subsystem. This RPC may only be called
|
||||
before SPDK subsystems have been initialized.
|
||||
@ -548,7 +548,7 @@ Example request:
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1,
|
||||
"method": "set_bdev_options",
|
||||
"method": "bdev_set_options",
|
||||
"params": {
|
||||
"bdev_io_pool_size": 65536,
|
||||
"bdev_io_cache_size": 256
|
||||
|
@ -786,7 +786,7 @@ spdk_bdev_subsystem_config_json(struct spdk_json_write_ctx *w)
|
||||
spdk_json_write_array_begin(w);
|
||||
|
||||
spdk_json_write_object_begin(w);
|
||||
spdk_json_write_named_string(w, "method", "set_bdev_options");
|
||||
spdk_json_write_named_string(w, "method", "bdev_set_options");
|
||||
spdk_json_write_named_object_begin(w, "params");
|
||||
spdk_json_write_named_uint32(w, "bdev_io_pool_size", g_bdev_opts.bdev_io_pool_size);
|
||||
spdk_json_write_named_uint32(w, "bdev_io_cache_size", g_bdev_opts.bdev_io_cache_size);
|
||||
|
@ -50,7 +50,7 @@ static const struct spdk_json_object_decoder rpc_set_bdev_opts_decoders[] = {
|
||||
};
|
||||
|
||||
static void
|
||||
spdk_rpc_set_bdev_options(struct spdk_jsonrpc_request *request, const struct spdk_json_val *params)
|
||||
spdk_rpc_bdev_set_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;
|
||||
@ -90,4 +90,5 @@ spdk_rpc_set_bdev_options(struct spdk_jsonrpc_request *request, const struct spd
|
||||
spdk_json_write_bool(w, true);
|
||||
spdk_jsonrpc_end_result(request, w);
|
||||
}
|
||||
SPDK_RPC_REGISTER("set_bdev_options", spdk_rpc_set_bdev_options, SPDK_RPC_STARTUP)
|
||||
SPDK_RPC_REGISTER("bdev_set_options", spdk_rpc_bdev_set_options, SPDK_RPC_STARTUP)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_set_options, set_bdev_options)
|
||||
|
@ -7,7 +7,7 @@ import json
|
||||
from collections import OrderedDict
|
||||
|
||||
bdev_dict = OrderedDict()
|
||||
bdev_dict["set_bdev_options"] = []
|
||||
bdev_dict["bdev_set_options"] = []
|
||||
bdev_dict["bdev_split_create"] = []
|
||||
bdev_dict["bdev_nvme_set_options"] = []
|
||||
bdev_dict["bdev_nvme_attach_controller"] = []
|
||||
@ -154,7 +154,7 @@ def get_bdev_options_json(config, section):
|
||||
for option in config.options("Bdev"):
|
||||
set_param(params, option, config.get("Bdev", option))
|
||||
|
||||
return [{"params": to_json_params(params), "method": "set_bdev_options"}]
|
||||
return [{"params": to_json_params(params), "method": "bdev_set_options"}]
|
||||
|
||||
|
||||
def get_aio_bdev_json(config, section):
|
||||
|
@ -130,15 +130,16 @@ if __name__ == "__main__":
|
||||
p.set_defaults(func=context_switch_monitor)
|
||||
|
||||
# bdev
|
||||
def set_bdev_options(args):
|
||||
rpc.bdev.set_bdev_options(args.client,
|
||||
def bdev_set_options(args):
|
||||
rpc.bdev.bdev_set_options(args.client,
|
||||
bdev_io_pool_size=args.bdev_io_pool_size,
|
||||
bdev_io_cache_size=args.bdev_io_cache_size)
|
||||
|
||||
p = subparsers.add_parser('set_bdev_options', help="""Set options of bdev subsystem""")
|
||||
p = subparsers.add_parser('bdev_set_options', aliases=['set_bdev_options'],
|
||||
help="""Set options of bdev subsystem""")
|
||||
p.add_argument('-p', '--bdev-io-pool-size', help='Number of bdev_io structures in shared buffer pool', type=int)
|
||||
p.add_argument('-c', '--bdev-io-cache-size', help='Maximum number of bdev_io structures cached per thread', type=int)
|
||||
p.set_defaults(func=set_bdev_options)
|
||||
p.set_defaults(func=bdev_set_options)
|
||||
|
||||
def bdev_compress_create(args):
|
||||
print_json(rpc.bdev.bdev_compress_create(args.client,
|
||||
|
@ -1,7 +1,8 @@
|
||||
from .helpers import deprecated_alias
|
||||
|
||||
|
||||
def set_bdev_options(client, bdev_io_pool_size=None, bdev_io_cache_size=None):
|
||||
@deprecated_alias('set_bdev_options')
|
||||
def bdev_set_options(client, bdev_io_pool_size=None, bdev_io_cache_size=None):
|
||||
"""Set parameters for the bdev subsystem.
|
||||
|
||||
Args:
|
||||
@ -15,7 +16,7 @@ def set_bdev_options(client, bdev_io_pool_size=None, bdev_io_cache_size=None):
|
||||
if bdev_io_cache_size:
|
||||
params['bdev_io_cache_size'] = bdev_io_cache_size
|
||||
|
||||
return client.call('set_bdev_options', params)
|
||||
return client.call('bdev_set_options', params)
|
||||
|
||||
|
||||
@deprecated_alias('construct_compress_bdev')
|
||||
|
@ -20,7 +20,7 @@
|
||||
"bdev_io_pool_size": 65536,
|
||||
"bdev_io_cache_size": 256
|
||||
},
|
||||
"method": "set_bdev_options"
|
||||
"method": "bdev_set_options"
|
||||
},
|
||||
{
|
||||
"params": {
|
||||
|
@ -20,7 +20,7 @@
|
||||
"bdev_io_pool_size": 65536,
|
||||
"bdev_io_cache_size": 256
|
||||
},
|
||||
"method": "set_bdev_options"
|
||||
"method": "bdev_set_options"
|
||||
},
|
||||
{
|
||||
"params": {
|
||||
|
@ -23,7 +23,7 @@ trap 'killprocess $pid; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $pid
|
||||
$rpc_py iscsi_set_options -o 30 -a 4
|
||||
# Minimal number of bdev io pool (5) and cache (1)
|
||||
$rpc_py set_bdev_options -p 5 -c 1
|
||||
$rpc_py bdev_set_options -p 5 -c 1
|
||||
$rpc_py start_subsystem_init
|
||||
echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
|
@ -27,7 +27,7 @@ def filter_methods(do_remove_global_rpcs):
|
||||
'set_nvmf_target_config',
|
||||
'set_nvmf_target_max_subsystems',
|
||||
'nvmf_create_transport',
|
||||
'set_bdev_options',
|
||||
'bdev_set_options',
|
||||
'bdev_nvme_set_options',
|
||||
'bdev_nvme_set_hotplug',
|
||||
]
|
||||
|
@ -15,7 +15,7 @@ nvmftestinit
|
||||
nvmfappstart "-m 0xF --wait-for-rpc"
|
||||
|
||||
# Minimal number of bdev io pool (5) and cache (1)
|
||||
$rpc_py set_bdev_options -p 5 -c 1
|
||||
$rpc_py bdev_set_options -p 5 -c 1
|
||||
$rpc_py start_subsystem_init
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user