diff --git a/doc/bdev.md b/doc/bdev.md index 6103fdb92..1531ed979 100644 --- a/doc/bdev.md +++ b/doc/bdev.md @@ -423,11 +423,11 @@ please refer to @ref lvol. Before creating any logical volumes (lvols), an lvol store has to be created first on selected block device. Lvol store is lvols vessel responsible for managing underlying bdev space assignment to lvol bdevs and storing metadata. To create lvol store user -should use using `construct_lvol_store` RPC command. +should use using `bdev_lvol_create_lvstore` RPC command. Example command -`rpc.py construct_lvol_store Malloc2 lvs -c 4096` +`rpc.py bdev_lvol_create_lvstore Malloc2 lvs -c 4096` This will create lvol store named `lvs` with cluster size 4096, build on top of `Malloc2` bdev. In response user will be provided with uuid which is unique lvol store diff --git a/doc/jsonrpc.md b/doc/jsonrpc.md index 848f9bd55..64f6f6707 100644 --- a/doc/jsonrpc.md +++ b/doc/jsonrpc.md @@ -311,7 +311,7 @@ Example response: "bdev_lvol_create", "bdev_lvol_delete_lvstore", "bdev_lvol_rename_lvstore", - "construct_lvol_store" + "bdev_lvol_create_lvstore" ] } ~~~ @@ -4770,7 +4770,7 @@ The alias of the logical volume takes the format _lvs_name/lvol_name_ where: * _lvs_name_ is the name of the logical volume store. * _lvol_name_ is specified on creation and can be renamed. -## construct_lvol_store {#rpc_construct_lvol_store} +## bdev_lvol_create_lvstore {#rpc_bdev_lvol_create_lvstore} Construct a logical volume store. @@ -4795,7 +4795,7 @@ Example request: { "jsonrpc": "2.0", "id": 1, - "method": "construct_lvol_store", + "method": "bdev_lvol_create_lvstore", "params": { "lvs_name": "LVS0", "bdev_name": "Malloc0" diff --git a/doc/lvol.md b/doc/lvol.md index bb62a913d..d394dd847 100644 --- a/doc/lvol.md +++ b/doc/lvol.md @@ -80,7 +80,7 @@ There is no static configuration available for logical volumes. All configuratio RPC regarding lvolstore: ``` -construct_lvol_store [-h] [-c CLUSTER_SZ] bdev_name lvs_name +bdev_lvol_create_lvstore [-h] [-c CLUSTER_SZ] bdev_name lvs_name Constructs lvolstore on specified bdev with specified name. During construction bdev is unmapped at initialization and all data is erased. Then original bdev is claimed by diff --git a/module/bdev/lvol/vbdev_lvol_rpc.c b/module/bdev/lvol/vbdev_lvol_rpc.c index 7a27fdfdf..46c8652a3 100644 --- a/module/bdev/lvol/vbdev_lvol_rpc.c +++ b/module/bdev/lvol/vbdev_lvol_rpc.c @@ -40,7 +40,7 @@ SPDK_LOG_REGISTER_COMPONENT("lvolrpc", SPDK_LOG_LVOL_RPC) -struct rpc_construct_lvol_store { +struct rpc_bdev_lvol_create_lvstore { char *lvs_name; char *bdev_name; uint32_t cluster_sz; @@ -78,18 +78,18 @@ vbdev_get_lvol_store_by_uuid_xor_name(const char *uuid, const char *lvs_name, } static void -free_rpc_construct_lvol_store(struct rpc_construct_lvol_store *req) +free_rpc_bdev_lvol_create_lvstore(struct rpc_bdev_lvol_create_lvstore *req) { free(req->bdev_name); free(req->lvs_name); free(req->clear_method); } -static const struct spdk_json_object_decoder rpc_construct_lvol_store_decoders[] = { - {"bdev_name", offsetof(struct rpc_construct_lvol_store, bdev_name), spdk_json_decode_string}, - {"cluster_sz", offsetof(struct rpc_construct_lvol_store, cluster_sz), spdk_json_decode_uint32, true}, - {"lvs_name", offsetof(struct rpc_construct_lvol_store, lvs_name), spdk_json_decode_string}, - {"clear_method", offsetof(struct rpc_construct_lvol_store, clear_method), spdk_json_decode_string, true}, +static const struct spdk_json_object_decoder rpc_bdev_lvol_create_lvstore_decoders[] = { + {"bdev_name", offsetof(struct rpc_bdev_lvol_create_lvstore, bdev_name), spdk_json_decode_string}, + {"cluster_sz", offsetof(struct rpc_bdev_lvol_create_lvstore, cluster_sz), spdk_json_decode_uint32, true}, + {"lvs_name", offsetof(struct rpc_bdev_lvol_create_lvstore, lvs_name), spdk_json_decode_string}, + {"clear_method", offsetof(struct rpc_bdev_lvol_create_lvstore, clear_method), spdk_json_decode_string, true}, }; static void @@ -116,16 +116,16 @@ invalid: } static void -spdk_rpc_construct_lvol_store(struct spdk_jsonrpc_request *request, - const struct spdk_json_val *params) +spdk_rpc_bdev_lvol_create_lvstore(struct spdk_jsonrpc_request *request, + const struct spdk_json_val *params) { - struct rpc_construct_lvol_store req = {}; + struct rpc_bdev_lvol_create_lvstore req = {}; struct spdk_bdev *bdev; int rc = 0; enum lvs_clear_method clear_method; - if (spdk_json_decode_object(params, rpc_construct_lvol_store_decoders, - SPDK_COUNTOF(rpc_construct_lvol_store_decoders), + if (spdk_json_decode_object(params, rpc_bdev_lvol_create_lvstore_decoders, + SPDK_COUNTOF(rpc_bdev_lvol_create_lvstore_decoders), &req)) { SPDK_INFOLOG(SPDK_LOG_LVOL_RPC, "spdk_json_decode_object failed\n"); spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR, @@ -161,14 +161,15 @@ spdk_rpc_construct_lvol_store(struct spdk_jsonrpc_request *request, spdk_jsonrpc_send_error_response(request, -rc, spdk_strerror(rc)); goto cleanup; } - free_rpc_construct_lvol_store(&req); + free_rpc_bdev_lvol_create_lvstore(&req); return; cleanup: - free_rpc_construct_lvol_store(&req); + free_rpc_bdev_lvol_create_lvstore(&req); } -SPDK_RPC_REGISTER("construct_lvol_store", spdk_rpc_construct_lvol_store, SPDK_RPC_RUNTIME) +SPDK_RPC_REGISTER("bdev_lvol_create_lvstore", spdk_rpc_bdev_lvol_create_lvstore, SPDK_RPC_RUNTIME) +SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_lvol_create_lvstore, construct_lvol_store) struct rpc_bdev_lvol_rename_lvstore { char *old_name; diff --git a/scripts/rpc.py b/scripts/rpc.py index e3196b223..4a798cdd0 100755 --- a/scripts/rpc.py +++ b/scripts/rpc.py @@ -1152,20 +1152,21 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse p.set_defaults(func=get_log_print_level) # lvol - def construct_lvol_store(args): - print_json(rpc.lvol.construct_lvol_store(args.client, - bdev_name=args.bdev_name, - lvs_name=args.lvs_name, - cluster_sz=args.cluster_sz, - clear_method=args.clear_method)) + def bdev_lvol_create_lvstore(args): + print_json(rpc.lvol.bdev_lvol_create_lvstore(args.client, + bdev_name=args.bdev_name, + lvs_name=args.lvs_name, + cluster_sz=args.cluster_sz, + clear_method=args.clear_method)) - p = subparsers.add_parser('construct_lvol_store', help='Add logical volume store on base bdev') + p = subparsers.add_parser('bdev_lvol_create_lvstore', aliases=['construct_lvol_store'], + help='Add logical volume store on base bdev') p.add_argument('bdev_name', help='base bdev name') p.add_argument('lvs_name', help='name for lvol store') p.add_argument('-c', '--cluster-sz', help='size of cluster (in bytes)', type=int, required=False) p.add_argument('--clear-method', help="""Change clear method for data region. Available: none, unmap, write_zeroes""", required=False) - p.set_defaults(func=construct_lvol_store) + p.set_defaults(func=bdev_lvol_create_lvstore) def bdev_lvol_rename_lvstore(args): rpc.lvol.bdev_lvol_rename_lvstore(args.client, diff --git a/scripts/rpc/lvol.py b/scripts/rpc/lvol.py index 8da38709f..1c31f5eda 100644 --- a/scripts/rpc/lvol.py +++ b/scripts/rpc/lvol.py @@ -1,7 +1,8 @@ from .helpers import deprecated_alias -def construct_lvol_store(client, bdev_name, lvs_name, cluster_sz=None, clear_method=None): +@deprecated_alias('construct_lvol_store') +def bdev_lvol_create_lvstore(client, bdev_name, lvs_name, cluster_sz=None, clear_method=None): """Construct a logical volume store. Args: @@ -18,7 +19,7 @@ def construct_lvol_store(client, bdev_name, lvs_name, cluster_sz=None, clear_met params['cluster_sz'] = cluster_sz if clear_method: params['clear_method'] = clear_method - return client.call('construct_lvol_store', params) + return client.call('bdev_lvol_create_lvstore', params) @deprecated_alias('rename_lvol_store') diff --git a/scripts/spdkcli/ui_node.py b/scripts/spdkcli/ui_node.py index 116c7fe46..562d25d6e 100644 --- a/scripts/spdkcli/ui_node.py +++ b/scripts/spdkcli/ui_node.py @@ -105,7 +105,7 @@ class UILvolStores(UINode): """ cluster_size = self.ui_eval_param(cluster_size, "number", None) - self.get_root().create_lvol_store(lvs_name=name, bdev_name=bdev_name, cluster_sz=cluster_size) + self.get_root().bdev_lvol_create_lvstore(lvs_name=name, bdev_name=bdev_name, cluster_sz=cluster_size) def ui_command_delete(self, name=None, uuid=None): """ diff --git a/scripts/spdkcli/ui_root.py b/scripts/spdkcli/ui_root.py index 7a5fcac96..c8b69a89a 100644 --- a/scripts/spdkcli/ui_root.py +++ b/scripts/spdkcli/ui_root.py @@ -197,8 +197,8 @@ class UIRoot(UINode): yield LvolStore(lvs) @verbose - def create_lvol_store(self, **kwargs): - response = rpc.lvol.construct_lvol_store(self.client, **kwargs) + def bdev_lvol_create_lvstore(self, **kwargs): + response = rpc.lvol.bdev_lvol_create_lvstore(self.client, **kwargs) return response @verbose diff --git a/test/blobstore/blob_io_wait/blob_io_wait.sh b/test/blobstore/blob_io_wait/blob_io_wait.sh index 2550ddeee..a823c78ee 100755 --- a/test/blobstore/blob_io_wait/blob_io_wait.sh +++ b/test/blobstore/blob_io_wait/blob_io_wait.sh @@ -23,7 +23,7 @@ trap 'killprocess $bdev_svc_pid; exit 1' SIGINT SIGTERM EXIT waitforlisten $bdev_svc_pid $rpc_py bdev_aio_create $testdir/aio.bdev aio0 4096 -$rpc_py construct_lvol_store aio0 lvs0 +$rpc_py bdev_lvol_create_lvstore aio0 lvs0 $rpc_py bdev_lvol_create -l lvs0 lvol0 32 killprocess $bdev_svc_pid diff --git a/test/compress/compress.sh b/test/compress/compress.sh index a2a3fbc37..8c30a2e47 100755 --- a/test/compress/compress.sh +++ b/test/compress/compress.sh @@ -24,7 +24,7 @@ trap 'killprocess $bdev_svc_pid; compress_err_cleanup; exit 1' SIGINT SIGTERM EX waitforlisten $bdev_svc_pid bdf=$(iter_pci_class_code 01 08 02 | head -1) $rpc_py construct_nvme_bdev -b "Nvme0" -t "pcie" -a $bdf -lvs_u=$($rpc_py construct_lvol_store Nvme0n1 lvs0) +lvs_u=$($rpc_py bdev_lvol_create_lvstore Nvme0n1 lvs0) $rpc_py bdev_lvol_create -t -u $lvs_u lv0 100 # this will force isal_pmd as some of the CI systems need a qat driver update $rpc_py set_compress_pmd -p 2 diff --git a/test/iscsi_tgt/filesystem/filesystem.sh b/test/iscsi_tgt/filesystem/filesystem.sh index e98a866b5..5f9a385d5 100755 --- a/test/iscsi_tgt/filesystem/filesystem.sh +++ b/test/iscsi_tgt/filesystem/filesystem.sh @@ -47,7 +47,7 @@ $rpc_py add_portal_group $PORTAL_TAG $TARGET_IP:$ISCSI_PORT $rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK $rpc_py construct_nvme_bdev -b "Nvme0" -t "pcie" -a $bdf -ls_guid=$($rpc_py construct_lvol_store Nvme0n1 lvs_0) +ls_guid=$($rpc_py bdev_lvol_create_lvstore Nvme0n1 lvs_0) free_mb=$(get_lvs_free_mb "$ls_guid") # Using maximum 2048MiB to reduce the test time if [ $free_mb -gt 2048 ]; then diff --git a/test/iscsi_tgt/lvol/iscsi_lvol.sh b/test/iscsi_tgt/lvol/iscsi_lvol.sh index f9cc5d058..d0e1e6772 100755 --- a/test/iscsi_tgt/lvol/iscsi_lvol.sh +++ b/test/iscsi_tgt/lvol/iscsi_lvol.sh @@ -56,7 +56,7 @@ for i in $(seq 1 $NUM_LVS); do # construct malloc bdev and put its name in $bdev bdev=$($rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE) fi - ls_guid=$($rpc_py construct_lvol_store $bdev lvs_$i -c 1048576) + ls_guid=$($rpc_py bdev_lvol_create_lvstore $bdev lvs_$i -c 1048576) LUNs="" for j in $(seq 1 $NUM_LVOL); do lb_name=$($rpc_py bdev_lvol_create -u $ls_guid lbd_$j 10) diff --git a/test/iscsi_tgt/multiconnection/multiconnection.sh b/test/iscsi_tgt/multiconnection/multiconnection.sh index 79cb233b9..c3608113b 100755 --- a/test/iscsi_tgt/multiconnection/multiconnection.sh +++ b/test/iscsi_tgt/multiconnection/multiconnection.sh @@ -52,7 +52,7 @@ $rpc_py add_portal_group $PORTAL_TAG $TARGET_IP:$ISCSI_PORT $rpc_py add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK echo "Creating an iSCSI target node." -ls_guid=$($rpc_py construct_lvol_store "Nvme0n1" "lvs0" -c 1048576) +ls_guid=$($rpc_py bdev_lvol_create_lvstore "Nvme0n1" "lvs0" -c 1048576) # Assign even size for each lvol_bdev. get_lvs_free_mb $ls_guid diff --git a/test/json_config/json_config.sh b/test/json_config/json_config.sh index d222db8a1..c16effee9 100755 --- a/test/json_config/json_config.sh +++ b/test/json_config/json_config.sh @@ -200,7 +200,7 @@ function create_bdev_subsystem_config() { # For LVOLs use split to check for proper order of initialization. # If LVOLs cofniguration will be reordered (eg moved before splits or AIO/NVMe) # it should fail loading JSON config from file. - tgt_rpc construct_lvol_store -c 1048576 ${lvol_store_base_bdev}p0 lvs_test + tgt_rpc bdev_lvol_create_lvstore -c 1048576 ${lvol_store_base_bdev}p0 lvs_test tgt_rpc bdev_lvol_create -l lvs_test lvol0 32 tgt_rpc bdev_lvol_create -l lvs_test -t lvol1 32 tgt_rpc bdev_lvol_snapshot lvs_test/lvol0 snapshot0 diff --git a/test/lvol/lvol.sh b/test/lvol/lvol.sh index a9681fe72..3b40f8fe5 100755 --- a/test/lvol/lvol.sh +++ b/test/lvol/lvol.sh @@ -50,9 +50,9 @@ function usage() { 551: 'delete_lvol_bdev', 552: 'bdev_lvol_delete_lvstore_with_clones', 553: 'unregister_lvol_bdev', - 600: 'construct_lvol_store_with_cluster_size_max', - 601: 'construct_lvol_store_with_cluster_size_min', - 602: 'construct_lvol_store_with_all_clear_methods', + 600: 'bdev_lvol_create_lvstore_with_cluster_size_max', + 601: 'bdev_lvol_create_lvstore_with_cluster_size_min', + 602: 'bdev_lvol_create_lvstore_with_all_clear_methods', 650: 'thin_provisioning_check_space', 651: 'thin_provisioning_read_empty_bdev', 652: 'thin_provisioning_data_integrity_test', diff --git a/test/lvol/rpc_commands_lib.py b/test/lvol/rpc_commands_lib.py index 6e06fc870..009388ba5 100644 --- a/test/lvol/rpc_commands_lib.py +++ b/test/lvol/rpc_commands_lib.py @@ -112,18 +112,18 @@ class Commands_Rpc(object): output = self.rpc.bdev_malloc_create(total_size, block_size)[0] return output.rstrip('\n') - def construct_lvol_store(self, base_name, lvs_name, cluster_size=None, clear_method=None): - print("INFO: RPC COMMAND construct_lvol_store") + def bdev_lvol_create_lvstore(self, base_name, lvs_name, cluster_size=None, clear_method=None): + print("INFO: RPC COMMAND bdev_lvol_create_lvstore") if cluster_size: - output = self.rpc.construct_lvol_store(base_name, - lvs_name, - "-c {cluster_sz}".format(cluster_sz=cluster_size))[0] + output = self.rpc.bdev_lvol_create_lvstore(base_name, + lvs_name, + "-c {cluster_sz}".format(cluster_sz=cluster_size))[0] elif clear_method: - output = self.rpc.construct_lvol_store(base_name, - lvs_name, - "--clear-method {clear_m}".format(clear_m=clear_method))[0] + output = self.rpc.bdev_lvol_create_lvstore(base_name, + lvs_name, + "--clear-method {clear_m}".format(clear_m=clear_method))[0] else: - output = self.rpc.construct_lvol_store(base_name, lvs_name)[0] + output = self.rpc.bdev_lvol_create_lvstore(base_name, lvs_name)[0] return output.rstrip('\n') def bdev_lvol_create(self, uuid, lbd_name, size, thin=False): diff --git a/test/lvol/test_cases.py b/test/lvol/test_cases.py index 94a4ae900..8499f8119 100644 --- a/test/lvol/test_cases.py +++ b/test/lvol/test_cases.py @@ -110,7 +110,7 @@ def test_counter(): def case_message(func): def inner(*args, **kwargs): test_name = { - # construct_lvol_store - positive tests + # bdev_lvol_create_lvstore - positive tests 1: 'construct_lvs_positive', # bdev_lvol_create - positive tests 50: 'construct_logical_volume_positive', @@ -136,7 +136,7 @@ def case_message(func): # bdev_lvol_delete_lvstore - negative tests 300: 'bdev_lvol_delete_lvstore_nonexistent_lvs_uuid', 301: 'delete_lvol_store_underlying_bdev', - # construct_lvol_store - negative tests + # bdev_lvol_create_lvstore - negative tests 450: 'construct_lvs_nonexistent_bdev', 451: 'construct_lvs_on_bdev_twice', 452: 'construct_lvs_name_twice', @@ -146,9 +146,9 @@ def case_message(func): 551: 'delete_lvol_bdev', 552: 'bdev_lvol_delete_lvstore_with_clones', 553: 'unregister_lvol_bdev', - 600: 'construct_lvol_store_with_cluster_size_max', - 601: 'construct_lvol_store_with_cluster_size_min', - 602: 'construct_lvol_store_with_all_clear_methods', + 600: 'bdev_lvol_create_lvstore_with_cluster_size_max', + 601: 'bdev_lvol_create_lvstore_with_cluster_size_min', + 602: 'bdev_lvol_create_lvstore_with_all_clear_methods', # Provisioning 650: 'thin_provisioning_check_space', 651: 'thin_provisioning_read_empty_bdev', @@ -321,14 +321,14 @@ class TestCases(object): construct_lvs_positive Positive test for constructing a new lvol store. - Call construct_lvol_store with correct base bdev name. + Call bdev_lvol_create_lvstore with correct base bdev name. """ # Create malloc bdev base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct_lvol_store on correct, exisitng malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -339,7 +339,7 @@ class TestCases(object): # Expected result # - call successful, return code = 0, uuid printed to stdout - # - bdev_lvol_get_lvstores: backend used for construct_lvol_store has uuid + # - bdev_lvol_get_lvstores: backend used for bdev_lvol_create_lvstore has uuid # field set with the same uuid as returned from RPC call # - no other operation fails return fail_count @@ -356,8 +356,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Create lvol store on correct, exisitng malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -394,8 +394,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on correct, exisitng malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Verify lvol store was created correctly fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -438,8 +438,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -477,10 +477,10 @@ class TestCases(object): base_name_2 = self.c.bdev_malloc_create(self.total_size, self.block_size) # Create logical volume stores on created malloc bdevs - uuid_store_1 = self.c.construct_lvol_store(base_name_1, - self.lvs_name + "1") - uuid_store_2 = self.c.construct_lvol_store(base_name_2, - self.lvs_name + "2") + uuid_store_1 = self.c.bdev_lvol_create_lvstore(base_name_1, + self.lvs_name + "1") + uuid_store_2 = self.c.bdev_lvol_create_lvstore(base_name_2, + self.lvs_name + "2") # Verify stores were created correctly fail_count = self.c.check_bdev_lvol_get_lvstores(base_name_1, uuid_store_1, self.cluster_size) @@ -546,8 +546,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Create logical volume store on malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response from bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -590,8 +590,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Create logical volume store on malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Using bdev_lvol_get_lvstores verify that logical volume store was correctly created fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -633,8 +633,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Create lvol store - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -706,8 +706,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on created malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -747,8 +747,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Create lvol store on created malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -778,8 +778,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on created malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -809,8 +809,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on created malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -851,8 +851,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on correct, exisitng malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -891,8 +891,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on create malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -960,8 +960,8 @@ class TestCases(object): # Construct aio bdev self.c.bdev_aio_create(aio_bdev0, base_name, 4096) # Create lvol store on created aio bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) # Destroy lvol store @@ -1018,8 +1018,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on created malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -1046,15 +1046,15 @@ class TestCases(object): construct_lvs_nonexistent_bdev Negative test for constructing a new lvol store. - Call construct_lvol_store with base bdev name which does not + Call bdev_lvol_create_lvstore with base bdev name which does not exist in configuration. """ fail_count = 0 bad_bdev_id = random.randrange(999999999) - # Try construct_lvol_store on bdev which does not exist - if self.c.construct_lvol_store(bad_bdev_id, - self.lvs_name, - self.cluster_size) == 0: + # Try bdev_lvol_create_lvstore on bdev which does not exist + if self.c.bdev_lvol_create_lvstore(bad_bdev_id, + self.lvs_name, + self.cluster_size) == 0: fail_count += 1 return fail_count @@ -1064,21 +1064,21 @@ class TestCases(object): construct_lvs_on_bdev_twice Negative test for constructing a new lvol store. - Call construct_lvol_store with base bdev name twice. + Call bdev_lvol_create_lvstore with base bdev name twice. """ # Create malloc bdev base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on created malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) - # Try construct_lvol_store on the same bdev as in last step + # Try bdev_lvol_create_lvstore on the same bdev as in last step # This call should fail as base bdev is already claimed by lvol store - if self.c.construct_lvol_store(base_name, - self.lvs_name) == 0: + if self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) == 0: fail_count += 1 self.c.bdev_lvol_delete_lvstore(uuid_store) self.c.delete_malloc_bdev(base_name) @@ -1100,8 +1100,8 @@ class TestCases(object): base_name_2 = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on first malloc - uuid_store_1 = self.c.construct_lvol_store(base_name_1, - self.lvs_name) + uuid_store_1 = self.c.bdev_lvol_create_lvstore(base_name_1, + self.lvs_name) # using bdev_lvol_get_lvstores verify that logical volume store was correctly created # and has arguments as provided in step earlier (cluster size, friendly name, base bdev) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name_1, @@ -1110,8 +1110,8 @@ class TestCases(object): # Try to create another logical volume store on second malloc bdev using the # same friendly name as before. This step is expected to fail as lvol stores # cannot have the same name - if self.c.construct_lvol_store(base_name_2, - self.lvs_name) == 0: + if self.c.bdev_lvol_create_lvstore(base_name_2, + self.lvs_name) == 0: fail_count += 1 fail_count += self.c.bdev_lvol_delete_lvstore(uuid_store_1) @@ -1132,8 +1132,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct_lvol_store on correct, exisitng malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -1143,8 +1143,8 @@ class TestCases(object): self.lbd_name, size) # Construct nested lvol store on created lvol_bdev nested_lvs_name = self.lvs_name + "_nested" - nested_lvs_uuid = self.c.construct_lvol_store(uuid_bdev, - nested_lvs_name) + nested_lvs_uuid = self.c.bdev_lvol_create_lvstore(uuid_bdev, + nested_lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count += self.c.check_bdev_lvol_get_lvstores(uuid_bdev, nested_lvs_uuid, self.cluster_size) @@ -1176,14 +1176,14 @@ class TestCases(object): delete_bdev_positive Positive test for deleting malloc bdev. - Call construct_lvol_store with correct base bdev name. + Call bdev_lvol_create_lvstore with correct base bdev name. """ # Create malloc bdev base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct_lvol_store on correct, exisitng malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -1215,9 +1215,9 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct_lvol_store on correct, exisitng malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name, - self.cluster_size) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name, + self.cluster_size) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -1280,9 +1280,9 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct_lvol_store on correct, exisitng malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name, - self.cluster_size) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name, + self.cluster_size) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -1341,9 +1341,9 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct_lvol_store on correct, exisitng malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name, - self.cluster_size) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name, + self.cluster_size) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -1378,10 +1378,10 @@ class TestCases(object): @case_message def test_case600(self): """ - construct_lvol_store_with_cluster_size_max + bdev_lvol_create_lvstore_with_cluster_size_max Negative test for constructing a new lvol store. - Call construct_lvol_store with cluster size is equal malloc bdev size + 1B. + Call bdev_lvol_create_lvstore with cluster size is equal malloc bdev size + 1B. """ fail_count = 0 # Create malloc bdev @@ -1389,9 +1389,9 @@ class TestCases(object): self.block_size) # Construct_lvol_store on correct, exisitng malloc bdev and cluster size equal # malloc bdev size in bytes + 1B - lvol_uuid = self.c.construct_lvol_store(base_name, - self.lvs_name, - (self.total_size * 1024 * 1024) + 1) == 0 + lvol_uuid = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name, + (self.total_size * 1024 * 1024) + 1) == 0 if self.c.check_bdev_lvol_get_lvstores(base_name, lvol_uuid) == 0: fail_count += 1 fail_count += self.c.delete_malloc_bdev(base_name) @@ -1404,17 +1404,17 @@ class TestCases(object): @case_message def test_case601(self): """ - construct_lvol_store_with_cluster_size_min + bdev_lvol_create_lvstore_with_cluster_size_min Negative test for constructing a new lvol store. - Call construct_lvol_store with cluster size smaller than minimal value of 8192. + Call bdev_lvol_create_lvstore with cluster size smaller than minimal value of 8192. """ fail_count = 0 # Create malloc bdev base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Try construct lvol store on malloc bdev with cluster size 8191 - lvol_uuid = self.c.construct_lvol_store(base_name, self.lvs_name, 8191) + lvol_uuid = self.c.bdev_lvol_create_lvstore(base_name, self.lvs_name, 8191) # Verify that lvol store was not created if self.c.check_bdev_lvol_get_lvstores(base_name, lvol_uuid) == 0: fail_count += 1 @@ -1428,16 +1428,16 @@ class TestCases(object): @case_message def test_case602(self): """ - construct_lvol_store_with_all_clear_methods + bdev_lvol_create_lvstore_with_all_clear_methods - Call construct_lvol_store with all options for clear methods. + Call bdev_lvol_create_lvstore with all options for clear methods. """ fail_count = 0 # Create malloc bdev base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store with clear method 'none' - lvol_uuid = self.c.construct_lvol_store(base_name, self.lvs_name, clear_method="none") + lvol_uuid = self.c.bdev_lvol_create_lvstore(base_name, self.lvs_name, clear_method="none") fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, lvol_uuid) fail_count += self.c.delete_malloc_bdev(base_name) @@ -1445,7 +1445,7 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store with clear method 'unmap' - lvol_uuid = self.c.construct_lvol_store(base_name, self.lvs_name, clear_method="unmap") + lvol_uuid = self.c.bdev_lvol_create_lvstore(base_name, self.lvs_name, clear_method="unmap") fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, lvol_uuid) fail_count += self.c.delete_malloc_bdev(base_name) @@ -1453,7 +1453,7 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store with clear method 'write_zeroes' - lvol_uuid = self.c.construct_lvol_store(base_name, self.lvs_name, clear_method="write_zeroes") + lvol_uuid = self.c.bdev_lvol_create_lvstore(base_name, self.lvs_name, clear_method="write_zeroes") fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, lvol_uuid) fail_count += self.c.delete_malloc_bdev(base_name) @@ -1474,8 +1474,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # create lvol store on mamloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) lvs = self.c.bdev_lvol_get_lvstores(self.lvs_name)[0] @@ -1554,8 +1554,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # construct lvol store on malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) lvs = self.c.bdev_lvol_get_lvstores(self.lvs_name)[0] @@ -1612,8 +1612,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # construct lvol store on malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) lvs = self.c.bdev_lvol_get_lvstores(self.lvs_name)[0] @@ -1654,7 +1654,7 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, self.lvs_name) fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) # Construct thin provisioned lvol bdevs on created lvol store @@ -1728,7 +1728,7 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # construct lvol store on malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, self.lvs_name) fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) lvs = self.c.bdev_lvol_get_lvstores(self.lvs_name)[0] @@ -1799,7 +1799,7 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # construct lvol store on malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, self.lvs_name) fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) lvs = self.c.bdev_lvol_get_lvstores(self.lvs_name)[0] @@ -1869,8 +1869,8 @@ class TestCases(object): # Create initial configuration on running vhost instance # create lvol store, create 5 bdevs # save info of all lvs and lvol bdevs - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -1943,8 +1943,8 @@ class TestCases(object): # Create lvol store on aio bdev, create ten lvol bdevs on lvol store and # verify all configuration call results - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -1977,8 +1977,8 @@ class TestCases(object): self.c.bdev_aio_create(aio_bdev0, base_name, 4096) # construct lvol store on aio bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -2027,17 +2027,17 @@ class TestCases(object): # Create initial configuration on running vhost instance # create lvol store, create 5 bdevs # save info of all lvs and lvol bdevs - uuid_store_1M = self.c.construct_lvol_store(base_name_1M, - self.lvs_name + "_1M", - cluster_size_1M) + uuid_store_1M = self.c.bdev_lvol_create_lvstore(base_name_1M, + self.lvs_name + "_1M", + cluster_size_1M) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name_1M, uuid_store_1M, cluster_size_1M) - uuid_store_32M = self.c.construct_lvol_store(base_name_32M, - self.lvs_name + "_32M", - cluster_size_32M) + uuid_store_32M = self.c.bdev_lvol_create_lvstore(base_name_32M, + self.lvs_name + "_32M", + cluster_size_32M) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name_32M, uuid_store_32M, @@ -2135,8 +2135,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -2189,8 +2189,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) size = self.get_lvs_divided_size(6) @@ -2264,8 +2264,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) # Create thin provisioned lvol bdev with size equal to 50% of lvs space @@ -2319,8 +2319,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) # Create thick provisioned lvol bdev @@ -2366,8 +2366,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) lvs = self.c.bdev_lvol_get_lvstores() @@ -2429,8 +2429,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Create lvol store - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) size = self.get_lvs_divided_size(6) @@ -2502,8 +2502,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Create lvol store - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) size = self.get_lvs_divided_size(6) @@ -2592,8 +2592,8 @@ class TestCases(object): self.block_size) # Create lvol store - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) size = self.get_lvs_divided_size(4) @@ -2683,8 +2683,8 @@ class TestCases(object): self.block_size) # Create lvol store - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) size = self.get_lvs_divided_size(4) @@ -2754,8 +2754,8 @@ class TestCases(object): self.block_size) # Create lvol store - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) lvs = self.c.bdev_lvol_get_lvstores() @@ -2853,8 +2853,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -2917,8 +2917,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -2997,8 +2997,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on malloc bdev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) @@ -3118,8 +3118,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on created malloc bdev - lvs_uuid = self.c.construct_lvol_store(base_name, - self.lvs_name) + lvs_uuid = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_name, lvs_uuid, self.cluster_size, @@ -3233,14 +3233,14 @@ class TestCases(object): self.block_size) # Create lvol store on each malloc bdev - lvs_uuid_1 = self.c.construct_lvol_store(base_bdev_1, - lvs_name_1) + lvs_uuid_1 = self.c.bdev_lvol_create_lvstore(base_bdev_1, + lvs_name_1) fail_count += self.c.check_bdev_lvol_get_lvstores(base_bdev_1, lvs_uuid_1, self.cluster_size, lvs_name_1) - lvs_uuid_2 = self.c.construct_lvol_store(base_bdev_2, - lvs_name_2) + lvs_uuid_2 = self.c.bdev_lvol_create_lvstore(base_bdev_2, + lvs_name_2) fail_count += self.c.check_bdev_lvol_get_lvstores(base_bdev_2, lvs_uuid_2, self.cluster_size, @@ -3339,8 +3339,8 @@ class TestCases(object): base_bdev = self.c.bdev_malloc_create(self.total_size, self.block_size) # Create lvol store on created malloc bdev - lvs_uuid = self.c.construct_lvol_store(base_bdev, - self.lvs_name) + lvs_uuid = self.c.bdev_lvol_create_lvstore(base_bdev, + self.lvs_name) fail_count += self.c.check_bdev_lvol_get_lvstores(base_bdev, lvs_uuid, self.cluster_size, @@ -3390,8 +3390,8 @@ class TestCases(object): base_name = self.c.bdev_malloc_create(self.total_size, self.block_size) # Construct lvol store on created malloc bddev - uuid_store = self.c.construct_lvol_store(base_name, - self.lvs_name) + uuid_store = self.c.bdev_lvol_create_lvstore(base_name, + self.lvs_name) # Check correct uuid values in response bdev_lvol_get_lvstores command fail_count = self.c.check_bdev_lvol_get_lvstores(base_name, uuid_store, self.cluster_size) diff --git a/test/nvmf/host/fio.sh b/test/nvmf/host/fio.sh index e2fa2913a..2358f16ec 100755 --- a/test/nvmf/host/fio.sh +++ b/test/nvmf/host/fio.sh @@ -47,7 +47,7 @@ if [ $RUN_NIGHTLY -eq 1 ]; then # Test fio_plugin as host with nvme lvol backend bdfs=$(iter_pci_class_code 01 08 02) $rpc_py construct_nvme_bdev -b Nvme0 -t PCIe -a $(echo $bdfs | awk '{ print $1 }') -i $NVMF_FIRST_TARGET_IP - ls_guid=$($rpc_py construct_lvol_store -c 1073741824 Nvme0n1 lvs_0) + ls_guid=$($rpc_py bdev_lvol_create_lvstore -c 1073741824 Nvme0n1 lvs_0) get_lvs_free_mb $ls_guid $rpc_py bdev_lvol_create -l lvs_0 lbd_0 $free_mb $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode2 -a -s SPDK00000000000001 @@ -58,7 +58,7 @@ if [ $RUN_NIGHTLY -eq 1 ]; then $rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode2 # Test fio_plugin as host with nvme lvol nested backend - ls_nested_guid=$($rpc_py construct_lvol_store --clear-method none lvs_0/lbd_0 lvs_n_0) + ls_nested_guid=$($rpc_py bdev_lvol_create_lvstore --clear-method none lvs_0/lbd_0 lvs_n_0) get_lvs_free_mb $ls_nested_guid $rpc_py bdev_lvol_create -l lvs_n_0 lbd_nest_0 $free_mb $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode3 -a -s SPDK00000000000001 diff --git a/test/nvmf/host/perf.sh b/test/nvmf/host/perf.sh index 71ff9b42d..370ea57d2 100755 --- a/test/nvmf/host/perf.sh +++ b/test/nvmf/host/perf.sh @@ -44,7 +44,7 @@ $rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 if [ $RUN_NIGHTLY -eq 1 ]; then # Configure nvme devices with nvmf lvol_bdev backend if [ -n "$local_nvme_trid" ]; then - ls_guid=$($rpc_py construct_lvol_store Nvme0n1 lvs_0) + ls_guid=$($rpc_py bdev_lvol_create_lvstore Nvme0n1 lvs_0) get_lvs_free_mb $ls_guid # We don't need to create an lvol larger than 20G for this test. # decreasing the size of the nested lvol allows us to take less time setting up @@ -55,7 +55,7 @@ if [ $RUN_NIGHTLY -eq 1 ]; then lb_guid=$($rpc_py bdev_lvol_create -u $ls_guid lbd_0 $free_mb) # Create lvol bdev for nested lvol stores - ls_nested_guid=$($rpc_py construct_lvol_store $lb_guid lvs_n_0) + ls_nested_guid=$($rpc_py bdev_lvol_create_lvstore $lb_guid lvs_n_0) get_lvs_free_mb $ls_nested_guid if [ $free_mb -gt 20480 ]; then free_mb=20480 diff --git a/test/nvmf/target/nvmf_lvol.sh b/test/nvmf/target/nvmf_lvol.sh index d77acb7bf..50868f152 100755 --- a/test/nvmf/target/nvmf_lvol.sh +++ b/test/nvmf/target/nvmf_lvol.sh @@ -32,7 +32,7 @@ base_bdevs+=$($rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE) $rpc_py construct_raid_bdev -n raid0 -z 64 -r 0 -b "$base_bdevs" # Create the logical volume store on the RAID volume -lvs=$($rpc_py construct_lvol_store raid0 lvs) +lvs=$($rpc_py bdev_lvol_create_lvstore raid0 lvs) # Create a logical volume on the logical volume store lvol=$($rpc_py bdev_lvol_create -u $lvs lvol $LVOL_BDEV_INIT_SIZE) diff --git a/test/openstack/run_openstack_tests.sh b/test/openstack/run_openstack_tests.sh index 78aafb9ce..5809f44c9 100755 --- a/test/openstack/run_openstack_tests.sh +++ b/test/openstack/run_openstack_tests.sh @@ -34,7 +34,7 @@ timing_exit run_rpc_proxy timing_enter configure_spdk $rpc_py get_bdevs $rpc_py bdev_lvol_delete_lvstore -l lvs0 || true -$rpc_py construct_lvol_store Nvme0n1 lvs0 +$rpc_py bdev_lvol_create_lvstore Nvme0n1 lvs0 $rpc_py get_bdevs timing_exit configure_spdk diff --git a/test/vhost/fiotest/fio.sh b/test/vhost/fiotest/fio.sh index 89d6ee3cc..428cc69c1 100755 --- a/test/vhost/fiotest/fio.sh +++ b/test/vhost/fiotest/fio.sh @@ -116,7 +116,7 @@ for vm_conf in ${vms[@]}; do for disk in "${disks[@]}"; do notice "Create a lvol store on RaidBdev2 and then a lvol bdev on the lvol store" if [[ $disk == "RaidBdev2" ]]; then - ls_guid=$($rpc_py construct_lvol_store RaidBdev2 lvs_0 -c 4194304) + ls_guid=$($rpc_py bdev_lvol_create_lvstore RaidBdev2 lvs_0 -c 4194304) free_mb=$(get_lvs_free_mb "$ls_guid") based_disk=$($rpc_py bdev_lvol_create -u $ls_guid lbd_0 $free_mb) else diff --git a/test/vhost/integrity/integrity_start.sh b/test/vhost/integrity/integrity_start.sh index ec8f4d1d5..51efe7fa5 100755 --- a/test/vhost/integrity/integrity_start.sh +++ b/test/vhost/integrity/integrity_start.sh @@ -66,7 +66,7 @@ notice "..." # Set up lvols and vhost controllers trap 'clean_lvol_cfg; error_exit "${FUNCNAME}" "${LINENO}"' SIGTERM SIGABRT ERR notice "Constructing lvol store and lvol bdev on top of Nvme0n1" -lvs_uuid=$($rpc_py construct_lvol_store Nvme0n1 lvol_store) +lvs_uuid=$($rpc_py bdev_lvol_create_lvstore Nvme0n1 lvol_store) $rpc_py bdev_lvol_create lvol_bdev 10000 -l lvol_store if [[ "$ctrl_type" == "spdk_vhost_scsi" ]]; then diff --git a/test/vhost/lvol/lvol_test.sh b/test/vhost/lvol/lvol_test.sh index deb4c000f..681fa1ad5 100755 --- a/test/vhost/lvol/lvol_test.sh +++ b/test/vhost/lvol/lvol_test.sh @@ -136,7 +136,7 @@ for (( i=0; i<$max_disks; i++ ));do # Create base lvol store on NVMe notice "Creating lvol store on device Nvme${i}n1" - ls_guid=$($rpc_py construct_lvol_store Nvme${i}n1 lvs_$i -c 4194304) + ls_guid=$($rpc_py bdev_lvol_create_lvstore Nvme${i}n1 lvs_$i -c 4194304) lvol_stores+=("$ls_guid") if $nested_lvol; then @@ -147,7 +147,7 @@ for (( i=0; i<$max_disks; i++ ));do lb_name=$($rpc_py bdev_lvol_create -u $ls_guid lbd_nest $size $thin) notice "Creating nested lvol store on lvol bdev: $lb_name" - nest_ls_guid=$($rpc_py construct_lvol_store $lb_name lvs_n_$i -c 4194304) + nest_ls_guid=$($rpc_py bdev_lvol_create_lvstore $lb_name lvs_n_$i -c 4194304) nest_lvol_stores+=("$nest_ls_guid") for (( j=0; j<$vm_count; j++)); do diff --git a/test/vhost/perf_bench/vhost_perf.sh b/test/vhost/perf_bench/vhost_perf.sh index 456db3882..8b5f7e217 100755 --- a/test/vhost/perf_bench/vhost_perf.sh +++ b/test/vhost/perf_bench/vhost_perf.sh @@ -263,7 +263,7 @@ else notice "Using logical volumes" trap 'cleanup_lvol_cfg; error_exit "${FUNCNAME}" "${LINENO}"' INT ERR for (( i=0; i<$max_disks; i++ ));do - ls_guid=$($rpc_py construct_lvol_store Nvme${i}n1 lvs_$i --clear-method none) + ls_guid=$($rpc_py bdev_lvol_create_lvstore Nvme${i}n1 lvs_$i --clear-method none) lvol_stores+=("$ls_guid") for (( j=0; j<${splits[$i]}; j++)); do free_mb=$(get_lvs_free_mb "$ls_guid") diff --git a/test/vhost/vhost_boot/vhost_boot.sh b/test/vhost/vhost_boot/vhost_boot.sh index 19493fa95..0b3453e2a 100755 --- a/test/vhost/vhost_boot/vhost_boot.sh +++ b/test/vhost/vhost_boot/vhost_boot.sh @@ -74,7 +74,7 @@ if [[ $nvme_bdev_bs != 512 ]]; then false fi -lvs_u=$($rpc_py construct_lvol_store Nvme0n1 lvs0) +lvs_u=$($rpc_py bdev_lvol_create_lvstore Nvme0n1 lvs0) lvb_u=$($rpc_py bdev_lvol_create -u $lvs_u lvb0 20000) timing_exit create_lvol