All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] misc large filesystem fixes
@ 2018-08-29 21:43 Eric Sandeen
  2018-08-30  3:19 ` Eryu Guan
  2018-09-25 19:12 ` [PATCH V2] " Eric Sandeen
  0 siblings, 2 replies; 8+ messages in thread
From: Eric Sandeen @ 2018-08-29 21:43 UTC (permalink / raw)
  To: fstests

There are a few tests which fail on large filesytems because
we run into mkfs limits.

xfs/010 and xfs/013 hardcode 2 AGs, but if the device is larger
than 2T this will fail.  Check the device size and restrict it
to just under 2T so that a 2-AG mkfs is possible.

xfs/178 tries to decrease the agcount and re-mkfs, but if the
default AG size was chosen to be 1T, decreasing the AG count
results in too-large AGs and mkfs fails.  The intention here
AFAICT is to simply re-mkfs with non-overlapping AG headers,
so increasing the AG count should achieve the same purpose,
and cause mkfs to choose a smaller-than-default AG size which
should pass.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/tests/xfs/010 b/tests/xfs/010
index ee1595c8..2b30c867 100755
--- a/tests/xfs/010
+++ b/tests/xfs/010
@@ -96,7 +96,14 @@ _require_xfs_finobt
 
 rm -f $seqres.full
 
-_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _filter_mkfs 2>$seqres.full
+# If 2 AGs would result in too-large AG size, restrict the size
+DSIZEOPT=""
+DEV_SZ=$(blockdev --getsize64 $SCRATCH_DEV)
+if [ "$DEV_SZ" -ge "$((2*(2**40)))" ]; then
+  DSIZEOPT="-d size=2047g"
+fi
+
+_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2 $DSIZEOPT" | _filter_mkfs 2>$seqres.full
 
 # sparsely populate the fs such that we create records with free inodes
 _scratch_mount
diff --git a/tests/xfs/013 b/tests/xfs/013
index 4d31d793..ee752de1 100755
--- a/tests/xfs/013
+++ b/tests/xfs/013
@@ -97,7 +97,14 @@ _require_command "$KILLALL_PROG" killall
 
 rm -f $seqres.full
 
-_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | \
+# If 2 AGs would result in too-large AG size, restrict the size
+DSIZEOPT=""
+DEV_SZ=$(blockdev --getsize64 $SCRATCH_DEV)
+if [ "$DEV_SZ" -ge "$((2*(2**40)))" ]; then
+  DSIZEOPT="-d size=2047g"
+fi
+
+_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2 $DSIZEOPT" | \
 	_filter_mkfs 2>> $seqres.full
 _scratch_mount
 
diff --git a/tests/xfs/178 b/tests/xfs/178
index 84151056..f7ea9139 100755
--- a/tests/xfs/178
+++ b/tests/xfs/178
@@ -51,8 +51,8 @@ _supported_os Linux
 # o Summary of testing:
 #    1. mkfs.xfs a default filesystem, note agcount value.
 #    2. dd zero first sector and repair and verify.
-#    3. mkfs.xfs overriding agcount to a smaller value
-#             (ie. each AG is bigger)
+#    3. mkfs.xfs overriding agcount to a larger value
+#             (ie. each AG is smaller)
 #    4. dd zero first sector, repair and verify.
 #          -> old mkfs.xfs will cause repair to incorrectly
 #             fix filesystem, new mkfs.xfs will be fine.
@@ -74,8 +74,8 @@ fi
 
 _dd_repair_check $SCRATCH_DEV $sectsz
 
-# smaller AGCOUNT
-let "agcount=$agcount-2"
+# larger AGCOUNT
+let "agcount=$agcount+2"
 _scratch_mkfs_xfs -dagcount=$agcount >/dev/null 2>&1 \
         || _fail "mkfs failed!"
 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-10-06 18:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 21:43 [PATCH] misc large filesystem fixes Eric Sandeen
2018-08-30  3:19 ` Eryu Guan
2018-08-30  3:30   ` Eric Sandeen
2018-08-30  4:29     ` Eryu Guan
2018-08-30  4:34     ` Dave Chinner
2018-08-31 17:44       ` Eric Sandeen
2018-09-25 19:12 ` [PATCH V2] " Eric Sandeen
2018-10-06 11:15   ` Eryu Guan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.