]> granicus.if.org Git - zfs/commitdiff
Reduce size of zvol and enforce 4k blocksize in zvol tests
authorGiuseppe Di Natale <dinatale2@users.noreply.github.com>
Wed, 1 Mar 2017 20:58:12 +0000 (12:58 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 1 Mar 2017 20:58:12 +0000 (12:58 -0800)
32-bit builders in the buildbot are having trouble completing
their ENOSPC testing in less than the timeout. Reduce the
zvol size and use a 4k block size to reduce read-modify-writes
which are particularly expensive on 32-bit systems due to the
reduced maximum ARC size.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Kash Pande <kash@tripleback.net>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes #5845

tests/zfs-tests/tests/functional/zvol/zvol.cfg
tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh
tests/zfs-tests/tests/functional/zvol/zvol_common.shlib

index 71f3d0381c49a139a85d8f2a3ebcd1f354041aa2..fb2a0385a24cfb352560820ed2ee620c92995a6b 100644 (file)
@@ -33,6 +33,7 @@ export DISK=${DISKS%% *}
 export TESTVOL=testvol
 export TESTFILE=testfile
 export TESTSNAP=testsnap
-export VOLSIZE=1g
+export VOLSIZE=256m
+export BLOCKSIZE=4K
 export DATA=0
 export ENOSPC=28
index e5feb6b5809b6c133405a5057ff99642c46331cc..629fdfafb129e6e140ce49eb81793f4b1793a8c1 100755 (executable)
@@ -40,7 +40,7 @@ if is_mpath_device $DISK; then
        delete_partitions
 fi
 
-default_zvol_setup $DISK $VOLSIZE
+default_zvol_setup $DISK $VOLSIZE $BLOCKSIZE
 
 $ECHO "y" | $NEWFS -v ${ZVOL_RDEVDIR}/$TESTPOOL/$TESTVOL >/dev/null 2>&1
 (( $? != 0 )) && log_fail "Unable to newfs(1M) $TESTPOOL/$TESTVOL"
index 94da0d4b4df0ef5583489dce47bd8f81bdf06b45..b5d5998fcc9bde2b67904aec7ba0cf6b890beeaf 100644 (file)
 #
 # Where disk_device: is the name of the disk to be used
 #       volume_size: is the size of the volume, e.g. 2G
+#       block_size:  is the block size of the volume
 #
-function default_zvol_setup # disk_device volume_size
+function default_zvol_setup # disk_device volume_size block_size
 {
-        typeset disk=$1
-        typeset size=$2
+       typeset disk=$1
+       typeset size=$2
+       typeset blocksize=$3
        typeset savedumpdev
        typeset -i output
+       typeset create_args
 
-        create_pool $TESTPOOL "$disk"
+       create_pool $TESTPOOL "$disk"
 
-        log_must $ZFS create -V $size $TESTPOOL/$TESTVOL
+       if [ -n "$blocksize" ]; then
+               create_args="-b $blocksize"
+       fi
+
+       log_must $ZFS create $create_args -V $size $TESTPOOL/$TESTVOL
        block_device_wait
 }