]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: Ensure cmdline geometry puts mkfs.xfs into multidisk mode
authorEric Sandeen <sandeen@sandeen.net>
Thu, 6 Dec 2012 22:02:16 +0000 (16:02 -0600)
committerBen Myers <bpm@sgi.com>
Fri, 4 Jan 2013 20:20:10 +0000 (14:20 -0600)
Ensure that when mkfs.xfs is invoked with commandline geometry, it
triggers multidisk mode and creates more AGs.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
292 [new file with mode: 0644]
292.out [new file with mode: 0644]
group

diff --git a/292 b/292
new file mode 100644 (file)
index 0000000..6843410
--- /dev/null
+++ b/292
@@ -0,0 +1,63 @@
+#! /bin/bash
+# FS QA Test No. 292
+#
+# Ensure mkfs with stripe geometry goes into multidisk mode
+# which results in more AGs
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2012 Red Hat, Inc.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#-----------------------------------------------------------------------
+#
+# creator
+owner=sandeen@redhat.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.*
+}
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+# real QA test starts here
+
+# Modify as appropriate.
+_supported_fs xfs
+_supported_os IRIX Linux
+
+fsfile=$TEST_DIR/fsfile.$seq
+
+rm -f $fsfile
+$XFS_IO_PROG -f -c "truncate 256g" $fsfile
+
+echo "mkfs.xfs without geometry"
+mkfs.xfs -f $fsfile 2>&1 | sed -e "s:$fsfile:FILENAME:g" | grep meta-data
+echo "mkfs.xfs with cmdline geometry"
+mkfs.xfs -f -d su=16k,sw=5 $fsfile 2>&1 | sed -e "s:$fsfile:FILENAME:g" | grep meta-data
+
+# success, all done
+status=0
+exit
diff --git a/292.out b/292.out
new file mode 100644 (file)
index 0000000..fd88105
--- /dev/null
+++ b/292.out
@@ -0,0 +1,5 @@
+QA output created by 292
+mkfs.xfs without geometry
+meta-data=FILENAME   isize=256    agcount=4, agsize=16777216 blks
+mkfs.xfs with cmdline geometry
+meta-data=FILENAME   isize=256    agcount=16, agsize=4194304 blks
diff --git a/group b/group
index dc8db6543881d500f973f625250f37f1fdbc2800..c32839bcd3560fc8ce3a982c9fde52ff4e01f224 100644 (file)
--- a/group
+++ b/group
@@ -410,3 +410,4 @@ deprecated
 289 auto quick
 290 auto rw prealloc quick ioctl
 291 repair
+292 auto mkfs quick