mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs: be compatible with older mkfs.xfs which has no v5 support
With the change to CRCs by default, some tests are updated to call mkfs with "-m crc=0" option directly, and this breaks testings on older distros where mkfs.xfs doesn't have crc support. Introduce a new variable to tell if mkfs.xfs supports v5 xfs and do tweaks in _scratch_mkfs_xfs_opts() based on it. Signed-off-by: Eryu Guan <eguan@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
@@ -308,6 +308,11 @@ _scratch_mkfs_xfs_opts()
|
||||
{
|
||||
mkfs_opts=$*
|
||||
|
||||
# remove crc related mkfs options if mkfs.xfs doesn't support v5 xfs
|
||||
if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
|
||||
mkfs_opts=`echo $mkfs_opts | sed "s/-m\s\+crc=.//"`
|
||||
fi
|
||||
|
||||
_scratch_options mkfs
|
||||
|
||||
$MKFS_XFS_PROG $SCRATCH_OPTIONS $mkfs_opts $SCRATCH_DEV
|
||||
|
||||
Reference in New Issue
Block a user