test/vhost: run vhost tests with thin provisioned lvol bdevs

Change-Id: I004e6ebae38ec923817410f7ad530dd707a307b1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/393773
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Karol Latecki 2018-01-05 13:21:48 +01:00 committed by Jim Harris
parent e87d3400a5
commit cf100c2aa0
2 changed files with 9 additions and 6 deletions

View File

@ -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

View File

@ -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