From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 2/3] xfstests: Obey mkfs options for sized filesystems on XFS
Date: Tue, 3 Sep 2013 10:14:54 +1000 [thread overview]
Message-ID: <1378167295-7566-3-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1378167295-7566-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
The XFS implementation of _scratch_mkfs_sized ignores MKFS_OPTIONS
when a custom block size is set and so isn't testing things like
CRCs on such sized filesytsems. Fix this by ensuring we don't try to
override the block size is it is set in MKFS_OPTIONS. xfs/204 shows
this problem.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
common/rc | 8 +++++++-
tests/generic/204 | 4 +++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/common/rc b/common/rc
index 358f24b..8a239c5 100644
--- a/common/rc
+++ b/common/rc
@@ -578,7 +578,13 @@ _scratch_mkfs_sized()
case $FSTYP in
xfs)
- _scratch_mkfs_xfs -d size=$fssize -b size=$blocksize
+ # don't override MKFS_OPTIONS that set a block size.
+ echo $MKFS_OPTIONS |egrep -q "b?size="
+ if [ $? -eq 0 ]; then
+ _scratch_mkfs_xfs -d size=$fssize
+ else
+ _scratch_mkfs_xfs -d size=$fssize -b size=$blocksize
+ fi
;;
ext2|ext3|ext4|ext4dev)
yes | ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
diff --git a/tests/generic/204 b/tests/generic/204
index 98cb176..a054c8f 100755
--- a/tests/generic/204
+++ b/tests/generic/204
@@ -39,13 +39,15 @@ _supported_os Linux
_require_scratch
+rm -f $seqres.full
+
SIZE=`expr 104 \* 1024 \* 1024`
_scratch_mkfs_sized $SIZE &> /dev/null
_scratch_mount
# fix the reserve block pool to a known size so that the enospc calculations
# work out correctly.
-_scratch_resvblks 1024 > $seqres.full 2>&1
+_scratch_resvblks 1024 >> $seqres.full 2>&1
for i in `seq 1 22500`; do
echo -n > $SCRATCH_MNT/$i
--
1.8.3.2
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-09-03 0:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-03 0:14 [PATCH 0/3] xfstests: improvements for generic/204 Dave Chinner
2013-09-03 0:14 ` [PATCH 1/3] xfstests: generic/204 should call _check_scratch_fs Dave Chinner
2013-09-03 7:33 ` Christoph Hellwig
2013-09-03 0:14 ` Dave Chinner [this message]
2013-09-03 7:34 ` [PATCH 2/3] xfstests: Obey mkfs options for sized filesystems on XFS Christoph Hellwig
2013-09-03 0:14 ` [PATCH 3/3] xfstests: Make 204 work with different block and inode sizes Dave Chinner
2013-10-14 13:10 ` Rich Johnston
2013-10-14 13:09 ` [PATCH 0/3] xfstests: improvements for generic/204 Rich Johnston
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=1378167295-7566-3-git-send-email-david@fromorbit.com \
--to=david@fromorbit.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