public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: _fail in _scratch_mkfs_sized if device is too small
@ 2012-11-29 18:47 Eric Sandeen
  2012-11-30 16:05 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2012-11-29 18:47 UTC (permalink / raw)
  To: xfs-oss

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-30 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-29 18:47 [PATCH] xfstests: _fail in _scratch_mkfs_sized if device is too small Eric Sandeen
2012-11-30 16:05 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox