mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: rework _require_ext4_mkfs_feature
In all of the places where we need check to see if mkfs.ext4 can support a set of file system features, we also should be checking to see if the kernel can support those file system features. So rename _require_ext4_mkfs_feature to _require_scratch_ext4_feature, and actually format the file system in $SCRATCH_DEV. Also allow ext4/306 to run on systems where mke2fs doesn't support the "64bit" option. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
+1
-2
@@ -38,8 +38,7 @@ _supported_fs ext4
|
||||
_supported_os Linux
|
||||
|
||||
_require_scratch
|
||||
_require_ext4_mkfs_feature "bigalloc"
|
||||
_require_ext4_bigalloc
|
||||
_require_scratch_ext4_feature "bigalloc"
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ _supported_fs ext4
|
||||
_supported_os Linux
|
||||
_require_scratch_nocheck
|
||||
_require_command "$DEBUGFS_PROG" debugfs
|
||||
_require_ext4_mkfs_feature "bigalloc,meta_bg,^resize_inode"
|
||||
_require_scratch_ext4_feature "bigalloc,meta_bg,^resize_inode"
|
||||
|
||||
echo "Create ext4 fs and modify first_meta_bg's value"
|
||||
_scratch_mkfs "-O bigalloc,meta_bg,^resize_inode" >> $seqres.full 2>&1
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ _supported_fs ext4
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
_require_attrs
|
||||
_require_ext4_mkfs_feature ea_inode
|
||||
_require_scratch_ext4_feature "ea_inode"
|
||||
|
||||
_scratch_mkfs_ext4 -O ea_inode >/dev/null 2>&1
|
||||
_scratch_mount
|
||||
|
||||
+5
-2
@@ -44,12 +44,15 @@ _supported_fs ext4
|
||||
_supported_os Linux
|
||||
|
||||
_require_scratch
|
||||
_require_ext4_mkfs_feature "64bit"
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
# Make a small ext4 fs with extents disabled & mount it
|
||||
$MKFS_EXT4_PROG -F -O ^extents,^64bit $SCRATCH_DEV 512m >> $seqres.full 2>&1
|
||||
features="^extents"
|
||||
if grep -q 64bit /etc/mke2fs.conf ; then
|
||||
features="^extents,^64bit"
|
||||
fi
|
||||
$MKFS_EXT4_PROG -F -O "$features" $SCRATCH_DEV 512m >> $seqres.full 2>&1
|
||||
_scratch_mount || _fail "couldn't mount fs"
|
||||
|
||||
# Create a small non-extent-based file
|
||||
|
||||
Reference in New Issue
Block a user