* [PATCH] xfs/259: disable CRC if testing with 512 bytes block size
@ 2016-03-02 16:51 Eryu Guan
2016-03-05 20:45 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Eryu Guan @ 2016-03-02 16:51 UTC (permalink / raw)
To: fstests; +Cc: Eryu Guan, xfs
With CRCs being the default, TEST_DEV can still be created with
"-m crc=0" option explicitly, then 512 bytes block size is picked up by
the test, which causes mkfs failure in later mkfs tests.
Fix it by adding "-m crc=0" mkfs option in this case.
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
tests/xfs/259 | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/xfs/259 b/tests/xfs/259
index 16c1935..b5681fe 100755
--- a/tests/xfs/259
+++ b/tests/xfs/259
@@ -62,6 +62,12 @@ else
sizes_to_check="512 1024 2048 4096"
fi
+# If XFS mounted at $TEST_DIR is created with crc disabled explicitly, option
+# "-m crc=0" should be added to mkfs option as blocksize is 512
+mkfs_opts="-l size=32m -b size=$blocksize"
+if [ $_fs_has_crcs -ne 1 -a "$XFS_MKFS_HAS_NO_META_SUPPORT" == "" ]; then
+ mkfs_opts="$mkfs_opts -m crc=0"
+fi
four_TB=$(_math "2^42")
for del in $sizes_to_check; do
ddseek=$(_math "$four_TB - $del")
@@ -71,8 +77,7 @@ for del in $sizes_to_check; do
>/dev/null 2>&1 || echo "dd failed"
lofile=$(losetup -f)
losetup $lofile "$testfile"
- "$MKFS_XFS_PROG" -l size=32m -b size=$blocksize $lofile \
- >/dev/null || echo "mkfs failed!"
+ "$MKFS_XFS_PROG" $mkfs_opts $lofile >/dev/null || echo "mkfs failed!"
sync
losetup -d $lofile
done
--
2.5.0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs/259: disable CRC if testing with 512 bytes block size
2016-03-02 16:51 [PATCH] xfs/259: disable CRC if testing with 512 bytes block size Eryu Guan
@ 2016-03-05 20:45 ` Christoph Hellwig
2016-03-07 3:04 ` Eryu Guan
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2016-03-05 20:45 UTC (permalink / raw)
To: Eryu Guan; +Cc: fstests, xfs
This will force crcs off for all the blocksizes. We should
either always skip 512 bytes, or disable crcs only for the 512 byte
inode size case. The first seems either, but the second would give
better test coverage.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs/259: disable CRC if testing with 512 bytes block size
2016-03-05 20:45 ` Christoph Hellwig
@ 2016-03-07 3:04 ` Eryu Guan
0 siblings, 0 replies; 3+ messages in thread
From: Eryu Guan @ 2016-03-07 3:04 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: fstests, xfs
On Sat, Mar 05, 2016 at 12:45:17PM -0800, Christoph Hellwig wrote:
> This will force crcs off for all the blocksizes. We should
> either always skip 512 bytes, or disable crcs only for the 512 byte
> inode size case. The first seems either, but the second would give
> better test coverage.
Thanks for the review! I think the test itself has already disabled crc
for 512 block size fs, and this patch disables crc only if the TEST_DEV
has no crc, so it just fixes a corner case in this crc detecting, and
doesn't reduce the test coverage.
Thanks,
Eryu
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-07 3:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-02 16:51 [PATCH] xfs/259: disable CRC if testing with 512 bytes block size Eryu Guan
2016-03-05 20:45 ` Christoph Hellwig
2016-03-07 3:04 ` Eryu Guan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox