public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] xfstests: _fail in _scratch_mkfs_sized if device is too small
Date: Thu, 29 Nov 2012 12:47:22 -0600	[thread overview]
Message-ID: <50B7ADBA.5020509@redhat.com> (raw)

Without this, 273 was failing in cryptic ways for me
if the device size was < 2G.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/common.rc b/common.rc
index bf9c86f..8906067 100644
--- a/common.rc
+++ b/common.rc
@@ -348,6 +348,11 @@ _scratch_mkfs_sized()
     [ -z "$blocksize" ] && blocksize=4096
     blocks=`expr $fssize / $blocksize`
 
+    if [ "$HOSTOS" == "Linux" ]; then
+	devsize=`blockdev --getsize64 $SCRATCH_DEV`
+	[ "$fssize" -gt "$devsize" ] && _notrun "Scratch device too small"
+    fi
+
     case $FSTYP in
     xfs)
 	_scratch_mkfs_xfs -d size=$fssize -b size=$blocksize

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

             reply	other threads:[~2012-11-29 18:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 18:47 Eric Sandeen [this message]
2012-11-30 16:05 ` [PATCH] xfstests: _fail in _scratch_mkfs_sized if device is too small 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=50B7ADBA.5020509@redhat.com \
    --to=sandeen@redhat.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