diff mbox series

[2/3] xfs/216: always disable rmap and reflink when creating log size test fs

Message ID 155724822301.2624631.12786681370099485635.stgit@magnolia (mailing list archive)
State Accepted, archived
Headers show
Series fstests: various fixes | expand

Commit Message

Darrick J. Wong May 7, 2019, 4:57 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

This test seems to check that log sizes scale up properly with the size
of the filesystem, given a carefully controlled set of mkfs parameters.
Since turning on reflink or rmap will change the minimum log size,
change the test to detect their presence and ensure they're disabled.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/xfs/216 |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/xfs/216 b/tests/xfs/216
index b1fd8ecc..15ff9ae1 100755
--- a/tests/xfs/216
+++ b/tests/xfs/216
@@ -37,12 +37,18 @@  _require_loop
 LOOP_DEV=$SCRATCH_MNT/test_fs
 LOOP_MNT=$SCRATCH_MNT/test_fs_dir
 
+loop_mkfs_opts=
+$MKFS_XFS_PROG 2>&1 | grep -q rmapbt && \
+	loop_mkfs_opts="$loop_mkfs_opts -m rmapbt=0"
+$MKFS_XFS_PROG 2>&1 | grep -q reflink && \
+	loop_mkfs_opts="$loop_mkfs_opts -m reflink=0"
+
 _do_mkfs()
 {
 	for i in $*; do
 		echo -n "fssize=${i}g "
 		$MKFS_XFS_PROG -f -b size=4096 -l version=2 \
-			-d name=$LOOP_DEV,size=${i}g |grep log
+			-d name=$LOOP_DEV,size=${i}g $loop_mkfs_opts |grep log
 		mount -o loop -t xfs $LOOP_DEV $LOOP_MNT
 		echo "test write" > $LOOP_MNT/test
 		umount $LOOP_MNT > /dev/null 2>&1