diff --git a/test/vhost/lvol/lvol_test.sh b/test/vhost/lvol/lvol_test.sh index ed130b162..3c160c434 100755 --- a/test/vhost/lvol/lvol_test.sh +++ b/test/vhost/lvol/lvol_test.sh @@ -39,10 +39,12 @@ function usage() echo " lvol store and lvol bdevs." echo " (NVMe->lvol_store->lvol_bdev->lvol_store->lvol_bdev)" echo " Default: False" - echo "-x set -x for script debug" + echo " --thin-provisioning Create lvol bdevs thin provisioned instead of" + echo " allocating space up front" echo " --distribute-cores Use custom config file and run vhost controllers" echo " on different CPU cores instead of single core." echo " Default: False" + echo "-x set -x for script debug" exit 0 } @@ -84,6 +86,7 @@ while getopts 'xh-:' optchar; do ctrl-type=*) ctrl_type="${OPTARG#*=}" ;; nested-lvol) nested_lvol=true ;; distribute-cores) distribute_cores=true ;; + thin-provisioning) thin=" -t " ;; *) usage $0 "Invalid argument '$OPTARG'" ;; esac ;; @@ -139,7 +142,7 @@ for (( i=0; i<$max_disks; i++ ));do size=$((free_mb / (vm_count+1) )) notice "Creating lvol bdev on lvol store: $ls_guid" - lb_name=$($rpc_py construct_lvol_bdev -u $ls_guid lbd_nest $size) + lb_name=$($rpc_py construct_lvol_bdev -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) @@ -149,7 +152,7 @@ for (( i=0; i<$max_disks; i++ ));do notice "Creating nested lvol bdev for VM $i on lvol store $nest_ls_guid" free_mb=$(get_lvs_free_mb "$nest_ls_guid") nest_size=$((free_mb / (vm_count-j) )) - lb_name=$($rpc_py construct_lvol_bdev -u $nest_ls_guid lbd_vm_$j $nest_size) + lb_name=$($rpc_py construct_lvol_bdev -u $nest_ls_guid lbd_vm_$j $nest_size $thin) nest_lvol_bdevs+=("$lb_name") done fi @@ -159,7 +162,7 @@ for (( i=0; i<$max_disks; i++ ));do notice "Creating lvol bdev for VM $i on lvol store $ls_guid" free_mb=$(get_lvs_free_mb "$ls_guid") size=$((free_mb / (vm_count-j) )) - lb_name=$($rpc_py construct_lvol_bdev -u $ls_guid lbd_vm_$j $size) + lb_name=$($rpc_py construct_lvol_bdev -u $ls_guid lbd_vm_$j $size $thin) lvol_bdevs+=("$lb_name") done done diff --git a/test/vhost/spdk_vhost.sh b/test/vhost/spdk_vhost.sh index f4267e88f..248e325c1 100755 --- a/test/vhost/spdk_vhost.sh +++ b/test/vhost/spdk_vhost.sh @@ -104,12 +104,12 @@ case $1 in -ils|--integrity-lvol-scsi) echo 'Running lvol integrity suite...' ./lvol/lvol_test.sh -x --fio-bin=$FIO_BIN \ - --ctrl-type=spdk_vhost_scsi + --ctrl-type=spdk_vhost_scsi --thin-provisioning ;; -ilb|--integrity-lvol-blk) echo 'Running lvol integrity suite...' ./lvol/lvol_test.sh -x --fio-bin=$FIO_BIN \ - --ctrl-type=spdk_vhost_blk + --ctrl-type=spdk_vhost_blk --thin-provisioning ;; -ilsn|--integrity-lvol-scsi-nightly) if [[ $DISKS_NUMBER -ge 2 ]]; then