diff --git a/tests/zfs-tests/tests/functional/zvol/zvol.cfg b/tests/zfs-tests/tests/functional/zvol/zvol.cfg index 71f3d0381c49..4cd11c6171e8 100644 --- a/tests/zfs-tests/tests/functional/zvol/zvol.cfg +++ b/tests/zfs-tests/tests/functional/zvol/zvol.cfg @@ -33,6 +33,6 @@ export DISK=${DISKS%% *} export TESTVOL=testvol export TESTFILE=testfile export TESTSNAP=testsnap -export VOLSIZE=1g +export VOLSIZE=256m export DATA=0 export ENOSPC=28 diff --git a/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh b/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh index e5feb6b5809b..e7287908ef78 100755 --- a/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh +++ b/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh @@ -39,8 +39,9 @@ DISK=${DISKS%% *} if is_mpath_device $DISK; then delete_partitions fi +BLOCKSIZE="4K" -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" diff --git a/tests/zfs-tests/tests/functional/zvol/zvol_common.shlib b/tests/zfs-tests/tests/functional/zvol/zvol_common.shlib index 94da0d4b4df0..295fdb8b9824 100644 --- a/tests/zfs-tests/tests/functional/zvol/zvol_common.shlib +++ b/tests/zfs-tests/tests/functional/zvol/zvol_common.shlib @@ -39,14 +39,20 @@ # function default_zvol_setup # disk_device volume_size { - typeset disk=$1 - typeset size=$2 + typeset disk=$1 + typeset size=$2 + typeset blocksize=$3 + typeset create_args typeset savedumpdev typeset -i output - 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 }