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>
;;
Linux)
export MKFS_XFS_PROG="`set_prog_path mkfs.xfs`"
;;
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`"
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`"
btrfs)
[ "$MKFS_BTRFS_PROG" = "" ] && _fatal "mkfs.btrfs not found"
;;
btrfs)
[ "$MKFS_BTRFS_PROG" = "" ] && _fatal "mkfs.btrfs not found"
;;
+ ext4)
+ [ "$MKFS_EXT4_PROG" = "" ] && _fatal "mkfs.ext4 not found"
+ ;;
- /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=$?
2>$tmp_dir.mkfserr 1>$tmp_dir.mkfsstd
local mkfs_status=$?
) >> $seqres.full
# running mkfs again. overwrite previous mkfs output files
) >> $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
2>$tmp_dir.mkfserr 1>$tmp_dir.mkfsstd
local mkfs_status=$?
fi
_require_scratch
BTRFS_CONVERT_PROG="`set_prog_path btrfs-convert`"
_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
E2FSCK_PROG="`set_prog_path e2fsck`"
_require_command $BTRFS_CONVERT_PROG btrfs-convert
-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"
>> $seqres.full 2>&1
_scratch_mount || _fail "couldn't mount fs"
rm -f $seqres.full
# Make a small ext4 fs with extents disabled & mount it
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
_scratch_mount || _fail "couldn't mount fs"
# Create a small non-extent-based file