Commit a1bda4e1 authored by Maciej Wawryk's avatar Maciej Wawryk Committed by Jim Harris
Browse files

RPC: rename construct_split_vbdev to bdev_split_create



Signed-off-by: default avatarMaciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I37459e3c421e8c657f8d9a8647cdbccc4193bb58
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468089


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 72d06a99
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ Example response:
    "bdev_aio_delete",
    "bdev_aio_create",
    "destruct_split_vbdev",
    "construct_split_vbdev",
    "bdev_split_create",
    "bdev_error_inject_error",
    "bdev_error_delete",
    "bdev_error_create",
@@ -445,7 +445,7 @@ Example response:
        "split_size_mb": 0,
        "split_count": 2
      },
      "method": "construct_split_vbdev"
      "method": "bdev_split_create"
    },
    {
      "params": {
+1 −1
Original line number Diff line number Diff line
@@ -505,7 +505,7 @@ vbdev_split_config_json(struct spdk_json_write_ctx *w)
	TAILQ_FOREACH(cfg, &g_split_config, tailq) {
		spdk_json_write_object_begin(w);

		spdk_json_write_named_string(w, "method", "construct_split_vbdev");
		spdk_json_write_named_string(w, "method", "bdev_split_create");

		spdk_json_write_named_object_begin(w, "params");
		spdk_json_write_named_string(w, "base_bdev", cfg->base_bdev);
+4 −3
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ static const struct spdk_json_object_decoder rpc_construct_split_decoders[] = {
};

static void
spdk_rpc_construct_split_vbdev(struct spdk_jsonrpc_request *request,
spdk_rpc_bdev_split_create(struct spdk_jsonrpc_request *request,
			   const struct spdk_json_val *params)
{
	struct rpc_construct_split req = {};
@@ -102,7 +102,8 @@ spdk_rpc_construct_split_vbdev(struct spdk_jsonrpc_request *request,
out:
	free(req.base_bdev);
}
SPDK_RPC_REGISTER("construct_split_vbdev", spdk_rpc_construct_split_vbdev, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER("bdev_split_create", spdk_rpc_bdev_split_create, SPDK_RPC_RUNTIME)
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_split_create, construct_split_vbdev)

struct rpc_destruct_split {
	char *base_bdev;
+2 −2
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ from collections import OrderedDict

bdev_dict = OrderedDict()
bdev_dict["set_bdev_options"] = []
bdev_dict["construct_split_vbdev"] = []
bdev_dict["bdev_split_create"] = []
bdev_dict["bdev_nvme_set_options"] = []
bdev_dict["bdev_nvme_attach_controller"] = []
bdev_dict["bdev_nvme_set_hotplug"] = []
@@ -285,7 +285,7 @@ def get_split_bdev_json(config, section):
                "split_size_mb": split_size_mb,
                "split_count": split_count
            },
            "method": "construct_split_vbdev"
            "method": "bdev_split_create"
        })

    return split_json
+9 −8
Original line number Diff line number Diff line
@@ -1360,20 +1360,21 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
    p.set_defaults(func=destroy_raid_bdev)

    # split
    def construct_split_vbdev(args):
        print_array(rpc.bdev.construct_split_vbdev(args.client,
    def bdev_split_create(args):
        print_array(rpc.bdev.bdev_split_create(args.client,
                                               base_bdev=args.base_bdev,
                                               split_count=args.split_count,
                                               split_size_mb=args.split_size_mb))

    p = subparsers.add_parser('construct_split_vbdev', help="""Add given disk name to split config. If bdev with base_name
    p = subparsers.add_parser('bdev_split_create', aliases=['construct_split_vbdev'],
                              help="""Add given disk name to split config. If bdev with base_name
    name exist the split bdevs will be created right away, if not split bdevs will be created when base bdev became
    available (during examination process).""")
    p.add_argument('base_bdev', help='base bdev name')
    p.add_argument('-s', '--split-size-mb', help='size in MiB for each bdev', type=int, default=0)
    p.add_argument('split_count', help="""Optional - number of split bdevs to create. Total size * split_count must not
    exceed the base bdev size.""", type=int)
    p.set_defaults(func=construct_split_vbdev)
    p.set_defaults(func=bdev_split_create)

    def destruct_split_vbdev(args):
        rpc.bdev.destruct_split_vbdev(args.client,
Loading