public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH] xfsqa: define resblks for tests near ENOSPC
Date: Thu,  4 Mar 2010 12:47:34 +1100	[thread overview]
Message-ID: <1267667254-7971-1-git-send-email-david@fromorbit.com> (raw)

Several tests assume a certain amount of disk space free after the
reserve block pool is filled. Changing the default size of the
reserve block pool breaks these tests because there is less space
available that first thought.

Change these tests to specify a known reserve block pool size of
1024 blocks to ensure that they continue to work correctly even if
the default size changes.

Signed-off-by: Dave Chinner <david@fromorbit.com>
---
 104 |    4 ++++
 204 |    4 ++++
 205 |    4 ++++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/104 b/104
index b35c43b..c119822 100755
--- a/104
+++ b/104
@@ -48,6 +48,10 @@ _create_scratch()
 		echo "failed to mount $SCRATCH_DEV"
 		exit 1
 	fi
+
+	# fix the reserve block pool to a known size so that the enospc
+	# calculations work out correctly.
+	xfs_io -x -c "resblks 1024" $SCRATCH_MNT > /dev/null 2>&1
 }
 
 _fill_scratch()
diff --git a/204 b/204
index 8b94f60..3abe794 100755
--- a/204
+++ b/204
@@ -44,6 +44,10 @@ 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.
+xfs_io -x -c "resblks 1024" $SCRATCH_MNT >> $seq.full 2>&1
+
 for i in `seq 1 22500`; do
     echo -n > $SCRATCH_MNT/$i
     echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > $SCRATCH_MNT/$i
diff --git a/205 b/205
index 3f45185..5487ea4 100755
--- a/205
+++ b/205
@@ -43,6 +43,10 @@ _require_scratch
 _scratch_mkfs_xfs -d size=16m -b size=512 >/dev/null
 _scratch_mount
 
+# fix the reserve block pool to a known size so that the enospc calculations
+# work out correctly.
+xfs_io -x -c "resblks 1024" $SCRATCH_MNT >> $seq.full 2>&1
+
 # on a 16MB filesystem, there's 32768x512byte blocks. used is:
 #	- 4944 in the log,
 #	- 32+1 for the root inode cluster
-- 
1.6.5

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

             reply	other threads:[~2010-03-04  1:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04  1:47 Dave Chinner [this message]
2010-03-04 13:56 ` [PATCH] xfsqa: define resblks for tests near ENOSPC Christoph Hellwig
2010-03-04 22:04   ` Dave Chinner
2010-03-05  2:03     ` [PATCH v2] " Dave Chinner
2010-03-05  9:21       ` Christoph Hellwig

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=1267667254-7971-1-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