generic/108: work with 64k block size
authorChandan Rajendra <chandan@linux.vnet.ibm.com>
Mon, 24 Sep 2018 15:19:42 +0000 (20:49 +0530)
committerEryu Guan <guaneryu@gmail.com>
Sun, 30 Sep 2018 05:57:50 +0000 (13:57 +0800)
This commit increases the size of the scsi debug device to 300MiB to
accommodate a 275MiB sized XFS filesystem with 64k block size. mkfs.xfs
fails to create a 64k block sized filesystem on devices with capacity
less than 275MiB.

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Tested-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/108

index e4643351b2b2477c91d15e9f68f64968553050a5..9b4fe60f34fb48ad193ccad53a4febfdbf6e59fb 100755 (executable)
@@ -48,7 +48,7 @@ vgname=vg_$seq
 rm -f $seqres.full
 
 # _get_scsi_debug_dev returns a scsi debug device with 128M in size by default
 rm -f $seqres.full
 
 # _get_scsi_debug_dev returns a scsi debug device with 128M in size by default
-SCSI_DEBUG_DEV=`_get_scsi_debug_dev`
+SCSI_DEBUG_DEV=`_get_scsi_debug_dev 512 512 0 300`
 if [ "$SCSI_DEBUG_DEV" == "/dev/" ]; then
        _fail "Failed to initialize scsi debug device"
 fi
 if [ "$SCSI_DEBUG_DEV" == "/dev/" ]; then
        _fail "Failed to initialize scsi debug device"
 fi
@@ -59,7 +59,7 @@ $LVM_PROG pvcreate -f $SCSI_DEBUG_DEV $SCRATCH_DEV >>$seqres.full 2>&1
 $LVM_PROG vgcreate -f $vgname $SCSI_DEBUG_DEV $SCRATCH_DEV >>$seqres.full 2>&1
 # We use yes pipe instead of 'lvcreate --yes' because old version of lvm
 # (like 2.02.95 in RHEL6) don't support --yes option
 $LVM_PROG vgcreate -f $vgname $SCSI_DEBUG_DEV $SCRATCH_DEV >>$seqres.full 2>&1
 # We use yes pipe instead of 'lvcreate --yes' because old version of lvm
 # (like 2.02.95 in RHEL6) don't support --yes option
-yes | $LVM_PROG lvcreate -i 2 -I 4m -L 100m -n $lvname $vgname \
+yes | $LVM_PROG lvcreate -i 2 -I 4m -L 275m -n $lvname $vgname \
        >>$seqres.full 2>&1
 # wait for lv creation to fully complete
 $UDEV_SETTLE_PROG >>$seqres.full 2>&1
        >>$seqres.full 2>&1
 # wait for lv creation to fully complete
 $UDEV_SETTLE_PROG >>$seqres.full 2>&1