generic/042: set size to 38M for f2fs

25M is too small for f2fs:

Info: Disable heap-based policy
Info: Debug level = 0
Info: Label =
Info: Trim is enabled
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 51200 (25 MB)
Info: zone aligned segment0 blkaddr: 512
    Error: Device size is not sufficient for F2FS volume
    Error: Failed to prepare a super block!!!
    Error: Could not format the device!!!

So, set size to 38M for f2fs.

Signed-off-by: Sun Ke <sunke32@huawei.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Sun Ke
2021-05-18 07:47:00 -04:00
committed by Eryu Guan
parent 2605c135e1
commit 05fafbff99
+7 -1
View File
@@ -41,10 +41,16 @@ _crashtest()
img=$SCRATCH_MNT/$seq.img img=$SCRATCH_MNT/$seq.img
mnt=$SCRATCH_MNT/$seq.mnt mnt=$SCRATCH_MNT/$seq.mnt
file=$mnt/file file=$mnt/file
size=25M
# 25M is too small for f2fs.
if [ $FSTYP == "f2fs" ]; then
size=38M
fi
# Create an fs on a small, initialized image. The pattern is written to # Create an fs on a small, initialized image. The pattern is written to
# the image to detect stale data exposure. # the image to detect stale data exposure.
$XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 25M" $img \ $XFS_IO_PROG -f -c "truncate 0" -c "pwrite -S 0xCD 0 $size" $img \
>> $seqres.full 2>&1 >> $seqres.full 2>&1
_mkfs_dev $img >> $seqres.full 2>&1 _mkfs_dev $img >> $seqres.full 2>&1