ext4: define MKFS_EXT4_PROG

And use it instead of "mkfs.ext4" / "mkfs -t ext4"

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Theodore Ts'o
2014-09-29 12:46:43 +10:00
committed by Dave Chinner
parent cef47130ad
commit 4e2fa4d0db
5 changed files with 8 additions and 5 deletions
+1
View File
@@ -210,6 +210,7 @@ case "$HOSTOS" in
;;
Linux)
export MKFS_XFS_PROG="`set_prog_path mkfs.xfs`"
export MKFS_EXT4_PROG="`set_prog_path mkfs.ext4`"
export MKFS_UDF_PROG="`set_prog_path mkudffs`"
export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`"
export BTRFS_UTIL_PROG="`set_prog_path btrfs`"
+5 -2
View File
@@ -105,6 +105,9 @@ case "$FSTYP" in
btrfs)
[ "$MKFS_BTRFS_PROG" = "" ] && _fatal "mkfs.btrfs not found"
;;
ext4)
[ "$MKFS_EXT4_PROG" = "" ] && _fatal "mkfs.ext4 not found"
;;
nfs)
;;
cifs)
@@ -459,7 +462,7 @@ _scratch_mkfs_ext4()
local tmp_dir=/tmp/
/sbin/mkfs -t ext4 -- -F $MKFS_OPTIONS $extra_mkfs_options $SCRATCH_DEV \
$MKFS_EXT4_PROG -F $MKFS_OPTIONS $extra_mkfs_options $SCRATCH_DEV \
2>$tmp_dir.mkfserr 1>$tmp_dir.mkfsstd
local mkfs_status=$?
@@ -474,7 +477,7 @@ _scratch_mkfs_ext4()
) >> $seqres.full
# running mkfs again. overwrite previous mkfs output files
/sbin/mkfs -t ext4 -- -F $extra_mkfs_options $SCRATCH_DEV \
$MKFS_EXT4_PROG -F $extra_mkfs_options $SCRATCH_DEV \
2>$tmp_dir.mkfserr 1>$tmp_dir.mkfsstd
local mkfs_status=$?
fi
-1
View File
@@ -55,7 +55,6 @@ _supported_os Linux
_require_scratch
BTRFS_CONVERT_PROG="`set_prog_path btrfs-convert`"
MKFS_EXT4_PROG="`set_prog_path mkfs.ext4`"
E2FSCK_PROG="`set_prog_path e2fsck`"
_require_command $BTRFS_CONVERT_PROG btrfs-convert
+1 -1
View File
@@ -43,7 +43,7 @@ _require_ext4_bigalloc
rm -f $seqres.full
yes | mkfs.ext4 -O bigalloc -C 65536 -g 256 $SCRATCH_DEV 512m \
yes | $MKFS_EXT4_PROG -O bigalloc -C 65536 -g 256 $SCRATCH_DEV 512m \
>> $seqres.full 2>&1
_scratch_mount || _fail "couldn't mount fs"
+1 -1
View File
@@ -48,7 +48,7 @@ _require_scratch
rm -f $seqres.full
# Make a small ext4 fs with extents disabled & mount it
yes | mkfs.ext4 -O ^extents,^64bit $SCRATCH_DEV 512m >> $seqres.full 2>&1
yes | $MKFS_EXT4_PROG -O ^extents,^64bit $SCRATCH_DEV 512m >> $seqres.full 2>&1
_scratch_mount || _fail "couldn't mount fs"
# Create a small non-extent-based file