From: David Chinner <dgc@sgi.com>
To: xfs-dev <xfs-dev@sgi.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: [RFC, patch 2/2] xfsqa test to check log size scaling
Date: Fri, 22 Feb 2008 10:09:43 +1100 [thread overview]
Message-ID: <20080221230943.GH155407@sgi.com> (raw)
XFS-QA test to check that log size scaling works correctly
for old and new maximum log sizes.
Signed-off-by: Dave Chinner <dgc@sgi.com>
---
xfstests/185 | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
xfstests/185.out | 16 ++++++++++
xfstests/group | 1
3 files changed, 105 insertions(+)
Index: xfs-cmds/xfstests/185
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ xfs-cmds/xfstests/185 2008-02-22 09:56:21.366897882 +1100
@@ -0,0 +1,88 @@
+#! /bin/sh
+# FS QA Test No. 184
+#
+# large log size mkfs test.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
+#-----------------------------------------------------------------------
+#
+# creator
+owner=dgc@sgi.com
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1 # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ cd /
+ rm -f $tmp.*
+ _cleanup_testdir
+}
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+# real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+
+_setup_testdir
+_require_scratch
+_scratch_mkfs_xfs >/dev/null 2>&1
+_scratch_mount
+
+_require_loop
+LOOP_DEV=$SCRATCH_MNT/test_fs
+LOOP_MNT=$SCRATCH_MNT/test_fs_dir
+
+_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
+ mount -o loop -t xfs $LOOP_DEV $LOOP_MNT
+ echo "test write" > $LOOP_MNT/test
+ umount $LOOP_MNT
+ done
+}
+# make large holey file
+$XFS_IO_PROG -f -c "truncate 100t" $LOOP_DEV
+
+#make loopback mount dir
+mkdir $LOOP_MNT
+
+# test if large logs are supported
+LARGE_LOG=
+$MKFS_XFS_PROG -f -l size=256m -d name=$LOOP_DEV,size=10g > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+ LARGE_LOG=true
+fi
+
+# walk over standard sizes (up to 256GB)
+_do_mkfs 1 2 4 8 16 32 64 128 256
+
+if [ -n "$LARGE_LOG" ]; then
+ # walk over larger sizes
+ _do_mkfs 512 1024 2048 4096 8192 16384
+else
+ # just cut'n'paste from the golden output for the remaining sizes
+ cat << EOF
+fssize=512g log =internal log bsize=4096 blocks=65536, version=2
+fssize=1024g log =internal log bsize=4096 blocks=131072, version=2
+fssize=2048g log =internal log bsize=4096 blocks=262144, version=2
+fssize=4096g log =internal log bsize=4096 blocks=262144, version=2
+fssize=8192g log =internal log bsize=4096 blocks=262144, version=2
+fssize=16384g log =internal log bsize=4096 blocks=262144, version=2
+EOF
+fi
+
+status=0
+exit
Index: xfs-cmds/xfstests/185.out
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ xfs-cmds/xfstests/185.out 2008-02-22 09:56:21.370897357 +1100
@@ -0,0 +1,16 @@
+QA output created by 185
+fssize=1g log =internal log bsize=4096 blocks=2560, version=2
+fssize=2g log =internal log bsize=4096 blocks=2560, version=2
+fssize=4g log =internal log bsize=4096 blocks=2560, version=2
+fssize=8g log =internal log bsize=4096 blocks=2560, version=2
+fssize=16g log =internal log bsize=4096 blocks=2560, version=2
+fssize=32g log =internal log bsize=4096 blocks=4096, version=2
+fssize=64g log =internal log bsize=4096 blocks=8192, version=2
+fssize=128g log =internal log bsize=4096 blocks=16384, version=2
+fssize=256g log =internal log bsize=4096 blocks=32768, version=2
+fssize=512g log =internal log bsize=4096 blocks=65536, version=2
+fssize=1024g log =internal log bsize=4096 blocks=131072, version=2
+fssize=2048g log =internal log bsize=4096 blocks=262144, version=2
+fssize=4096g log =internal log bsize=4096 blocks=262144, version=2
+fssize=8192g log =internal log bsize=4096 blocks=262144, version=2
+fssize=16384g log =internal log bsize=4096 blocks=262144, version=2
Index: xfs-cmds/xfstests/group
===================================================================
--- xfs-cmds.orig/xfstests/group 2008-02-22 09:54:31.429339377 +1100
+++ xfs-cmds/xfstests/group 2008-02-22 09:56:21.370897357 +1100
@@ -272,3 +272,4 @@ filestreams dgc@sgi.com
182 metadata rw auto
183 rw other auto
184 metadata auto
+185 metadata log auto
next reply other threads:[~2008-02-21 23:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 23:09 David Chinner [this message]
2008-02-22 2:51 ` [RFC, patch 2/2] xfsqa test to check log size scaling Niv Sardi
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=20080221230943.GH155407@sgi.com \
--to=dgc@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.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