All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: Ben England <bengland@redhat.com>, xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] xfstests: Ensure cmdline geometry puts mkfs.xfs into multidisk mode
Date: Thu, 06 Dec 2012 16:02:16 -0600	[thread overview]
Message-ID: <50C115E8.9090106@sandeen.net> (raw)
In-Reply-To: <20121121095636.GC23339@infradead.org>

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>
---

Maybe this should also test device-specified geometry, but not sure
how to do that easily within xfstests, any ideas?

diff --git a/291 b/291
new file mode 100755
index 0000000..045d2a0
--- /dev/null
+++ b/291
@@ -0,0 +1,63 @@
+#! /bin/bash
+# FS QA Test No. 291
+#
+# 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/291.out b/291.out
new file mode 100644
index 0000000..fd702c0
--- /dev/null
+++ b/291.out
@@ -0,0 +1,5 @@
+QA output created by 291
+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 dacdb56..2ddb047 100644
--- a/group
+++ b/group
@@ -409,3 +409,4 @@ deprecated
 288 auto quick ioctl trim
 289 auto quick
 290 auto rw prealloc quick ioctl
+291 auto mkfs quick

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2012-12-06 21:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-20 16:34 [PATCH, RFC] mkfs.xfs: go into multidisk mode when geometry is on cmdline Eric Sandeen
2012-11-21  9:56 ` Christoph Hellwig
2012-12-06 21:35   ` [PATCH V2] " Eric Sandeen
2012-12-06 21:52     ` [PATCH V3] " Eric Sandeen
2012-12-08 11:59       ` Christoph Hellwig
2012-12-06 22:02   ` Eric Sandeen [this message]
2012-12-08 12:00     ` [PATCH] xfstests: Ensure cmdline geometry puts mkfs.xfs into multidisk mode Christoph Hellwig
2012-12-08 16:27       ` Eric Sandeen
2012-12-09 23:51         ` Dave Chinner
2012-12-10  0:23           ` Eric Sandeen

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=50C115E8.9090106@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=bengland@redhat.com \
    --cc=hch@infradead.org \
    --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 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.