Skip to contentSkip to conversation

xfs/078: omit -m crc=0 mkfs option if mkfs.xfs has no meta support

PATCH In review Eryu Guan 2 participants 4 messages Jul 22, 2015 – Jul 23, 2015

lore
Share & tools
lore

Eryu Guan

author
#0 lore raw

PATCH 1/1 xfs/078: omit -m crc=0 mkfs option if mkfs.xfs has no meta support

This basically does the same as in commit

90a3bfc xfs: be compatible with older mkfs.xfs which has no v5 support

which left xfs/078 behind.

---
 tests/xfs/078 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
tests/xfs/078 +5 -1
index 32436f7..0d6eb55 100755
@@ -87,7 +87,11 @@ _grow_loop()
 	echo
 
 	echo "*** mkfs loop file (size=$original)"
-	$MKFS_XFS_PROG -m crc=0 -b size=$bsize -d $dparam \
+	mkfs_crc_opts="-m crc=0"
+	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
+		mkfs_crc_opts=""
+	fi
+	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize -d $dparam \
 		| _filter_mkfs 2>/dev/null
 
 	echo "*** extend loop file"
Signature · 1 line
2.4.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Eryu Guan

This basically does the same as in commit

90a3bfc xfs: be compatible with older mkfs.xfs which has no v5 support

which left xfs/078 behind.

This is fine as far as it goes, but I think xfs/045 needs it too:

if ! _scratch_mkfs_xfs -m crc=0 >$tmp.out 2>&1
then
cat $tmp.out
echo "!!! failed to mkfs on $SCRATCH_DEV"
exit
fi

It fails "gracefully" but it doesn't need to, in this case.

In case I'm wrong, for this patch:

but xfs/045 might need a look too, either in this patch or a followup.

Thanks,
-Eric

Quoted 22 lines
---
 tests/xfs/078 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
tests/xfs/078 +5 -1
index 32436f7..0d6eb55 100755
@@ -87,7 +87,11 @@ _grow_loop()
 	echo
 
 	echo "*** mkfs loop file (size=$original)"
-	$MKFS_XFS_PROG -m crc=0 -b size=$bsize -d $dparam \
+	mkfs_crc_opts="-m crc=0"
+	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
+		mkfs_crc_opts=""
+	fi
+	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize -d $dparam \
 		| _filter_mkfs 2>/dev/null
 
 	echo "*** extend loop file"
author
#2 lore raw
Quoted 12 lines · Eric Sandeen
Quoted 7 lines · Eryu Guan

This basically does the same as in commit

90a3bfc xfs: be compatible with older mkfs.xfs which has no v5 support

which left xfs/078 behind.

This is fine as far as it goes, but I think xfs/045 needs it too:

Quoted 8 lines

if ! _scratch_mkfs_xfs -m crc=0 >$tmp.out 2>&1
then
cat $tmp.out
echo "!!! failed to mkfs on $SCRATCH_DEV"
exit
fi

It fails "gracefully" but it doesn't need to, in this case.

xfs/045 passed on my RHEL6 test box, I think that's because xfs/045 (and some other tests) takes use of _scratch_mkfs_xfs not call $MKFS_XFS_PROG directly, so commit 90a3bfc takes care of all the dirty work.

Thanks for the review!

Eryu

Quoted 37 lines

In case I'm wrong, for this patch:

but xfs/045 might need a look too, either in this patch or a followup.

Thanks,
-Eric

Quoted 12 lines
---
 tests/xfs/078 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
tests/xfs/078 +0 -0
index 32436f7..0d6eb55 100755
@@ -87,7 +87,11 @@ _grow_loop()
 	echo
 

tests/xfs/078 _grow_loop() · line 97

Quoted 10 lines
tests/xfs/078 +5 -1
 	echo "*** mkfs loop file (size=$original)"
-	$MKFS_XFS_PROG -m crc=0 -b size=$bsize -d $dparam \
+	mkfs_crc_opts="-m crc=0"
+	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
+		mkfs_crc_opts=""
+	fi
+	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize -d $dparam \
 		| _filter_mkfs 2>/dev/null
 
 	echo "*** extend loop file"

--
To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 20 lines · Eryu Guan
Quoted 19 lines · Eric Sandeen
Quoted 7 lines · Eryu Guan

This basically does the same as in commit

90a3bfc xfs: be compatible with older mkfs.xfs which has no v5 support

which left xfs/078 behind.

This is fine as far as it goes, but I think xfs/045 needs it too:

if ! _scratch_mkfs_xfs -m crc=0 >$tmp.out 2>&1
then
cat $tmp.out
echo "!!! failed to mkfs on $SCRATCH_DEV"
exit
fi

Quoted 7 lines
Quoted 1 line

It fails "gracefully" but it doesn't need to, in this case.

xfs/045 passed on my RHEL6 test box, I think that's because xfs/045 (and some other tests) takes use of _scratch_mkfs_xfs not call $MKFS_XFS_PROG directly, so commit 90a3bfc takes care of all the dirty work.

Thanks for the review!

Oh, you are right ... how did I miss that it's calling _scratch_mkfs_xfs, I'm sorry!

Yes, your patch is fine, and complete. Oops! :)

Thanks,
-Eric