@@ -27,7 +27,11 @@ _require_scratch
_require_scratch_ext4_feature "bigalloc"
BLOCK_SIZE=$(get_page_size)
-$MKFS_EXT4_PROG -F -b $BLOCK_SIZE -O bigalloc -C $(($BLOCK_SIZE * 16)) -g 256 $SCRATCH_DEV 512m \
+features=bigalloc
+if echo "${MOUNT_OPTIONS}" | grep -q 'test_dummy_encryption' ; then
+ features+=",encrypt"
+fi
+$MKFS_EXT4_PROG -F -b $BLOCK_SIZE -O $features -C $(($BLOCK_SIZE * 16)) -g 256 $SCRATCH_DEV 512m \
>> $seqres.full 2>&1
_scratch_mount
@@ -25,7 +25,11 @@ _require_scratch
_exclude_scratch_mount_option dax
_require_command "$RESIZE2FS_PROG" resize2fs
-$MKFS_EXT4_PROG -F -b 1024 -E "resize=262144" $SCRATCH_DEV 32768 >> $seqres.full 2>&1
+encrypt=
+if echo "${MOUNT_OPTIONS}" | grep -q 'test_dummy_encryption' ; then
+ encrypt="-O encrypt"
+fi
+$MKFS_EXT4_PROG -F -b 1024 -E "resize=262144" $encrypt $SCRATCH_DEV 32768 >> $seqres.full 2>&1
if [ $? -ne 0 ]; then
_notrun "Can't make file system with a block size of 1024"
fi
@@ -31,7 +31,10 @@ _require_command "$RESIZE2FS_PROG" resize2fs
# Make a small ext4 fs with extents disabled & mount it
features="^extents"
if grep -q 64bit /etc/mke2fs.conf ; then
- features="^extents,^64bit"
+ features+=",^64bit"
+fi
+if echo "${MOUNT_OPTIONS}" | grep -q 'test_dummy_encryption' ; then
+ features+=",encrypt"
fi
blksz=$(get_page_size)
@@ -121,6 +121,9 @@ case $FSTYP in
start=$(_math "$base*$agsize*$bsize")
len=$start
export MKFS_OPTIONS="-F -b $bsize -g $agsize"
+ if echo "${MOUNT_OPTIONS}" | grep -q 'test_dummy_encryption' ; then
+ MKFS_OPTIONS+=" -O encrypt"
+ fi
;;
xfs)
agsize=65538