public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: guaneryu@gmail.com, zlang@redhat.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me
Subject: [PATCH v1.1 3/3] xfs/216: handle larger log sizes
Date: Fri, 15 Apr 2022 08:04:58 -0700	[thread overview]
Message-ID: <20220415150458.GB17025@magnolia> (raw)
In-Reply-To: <164971771391.170109.16368399851366024102.stgit@magnolia>

mkfs will soon refuse to format a log smaller than 64MB, so update this
test to reflect the new log sizing calculations.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 tests/xfs/216             |   19 +++++++++++++++++++
 tests/xfs/216.out.64mblog |   10 ++++++++++
 tests/xfs/216.out.classic |    0 
 3 files changed, 29 insertions(+)
 create mode 100644 tests/xfs/216.out.64mblog
 rename tests/xfs/{216.out => 216.out.classic} (100%)

diff --git a/tests/xfs/216 b/tests/xfs/216
index c3697db7..ebae8979 100755
--- a/tests/xfs/216
+++ b/tests/xfs/216
@@ -29,6 +29,23 @@ $MKFS_XFS_PROG 2>&1 | grep -q rmapbt && \
 $MKFS_XFS_PROG 2>&1 | grep -q reflink && \
 	loop_mkfs_opts="$loop_mkfs_opts -m reflink=0"
 
+# Decide which golden output file we're using.  Starting with mkfs.xfs 5.15,
+# the default minimum log size was raised to 64MB for all cases, so we detect
+# that by test-formatting with a 512M filesystem.  This is a little handwavy,
+# but it's the best we can do.
+choose_golden_output() {
+	local seqfull=$1
+	local file=$2
+
+	if $MKFS_XFS_PROG -f -b size=4096 -l version=2 \
+			-d name=$file,size=512m $loop_mkfs_opts | \
+			grep -q 'log.*blocks=16384'; then
+		ln -f -s $seqfull.out.64mblog $seqfull.out
+	else
+		ln -f -s $seqfull.out.classic $seqfull.out
+	fi
+}
+
 _do_mkfs()
 {
 	for i in $*; do
@@ -43,6 +60,8 @@ _do_mkfs()
 # make large holey file
 $XFS_IO_PROG -f -c "truncate 256g" $LOOP_DEV
 
+choose_golden_output $0 $LOOP_DEV
+
 #make loopback mount dir
 mkdir $LOOP_MNT
 
diff --git a/tests/xfs/216.out.64mblog b/tests/xfs/216.out.64mblog
new file mode 100644
index 00000000..3c12085f
--- /dev/null
+++ b/tests/xfs/216.out.64mblog
@@ -0,0 +1,10 @@
+QA output created by 216
+fssize=1g log      =internal log           bsize=4096   blocks=16384, version=2
+fssize=2g log      =internal log           bsize=4096   blocks=16384, version=2
+fssize=4g log      =internal log           bsize=4096   blocks=16384, version=2
+fssize=8g log      =internal log           bsize=4096   blocks=16384, version=2
+fssize=16g log      =internal log           bsize=4096   blocks=16384, version=2
+fssize=32g log      =internal log           bsize=4096   blocks=16384, version=2
+fssize=64g log      =internal log           bsize=4096   blocks=16384, version=2
+fssize=128g log      =internal log           bsize=4096   blocks=16384, version=2
+fssize=256g log      =internal log           bsize=4096   blocks=32768, version=2
diff --git a/tests/xfs/216.out b/tests/xfs/216.out.classic
similarity index 100%
rename from tests/xfs/216.out
rename to tests/xfs/216.out.classic

  parent reply	other threads:[~2022-04-15 15:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 22:54 [PATCHSET 0/3] fstests: updates for xfsprogs 5.15 Darrick J. Wong
2022-04-11 22:55 ` [PATCH 1/3] common/rc: let xfs_scrub tell us about its unicode checker Darrick J. Wong
2022-04-13 18:07   ` Zorro Lang
2022-04-11 22:55 ` [PATCH 2/3] xfs: test mkfs.xfs config file stack corruption issues Darrick J. Wong
2022-04-13 17:56   ` Zorro Lang
2022-04-11 22:55 ` [PATCH 3/3] xfs/216: handle larger log sizes Darrick J. Wong
2022-04-13 17:44   ` Zorro Lang
2022-04-14  1:51     ` Darrick J. Wong
2022-04-14 19:25       ` Zorro Lang
2022-04-14 19:36         ` Darrick J. Wong
2022-04-15  3:24           ` Zorro Lang
2022-04-15 15:04   ` Darrick J. Wong [this message]
2022-04-16 13:35     ` [PATCH v1.1 " Zorro Lang
2022-04-17 14:42       ` Eryu Guan
2022-04-17 16:39         ` Zorro Lang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220415150458.GB17025@magnolia \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox