| To: | xfs-oss <xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] xfstests: _fail in _scratch_mkfs_sized if device is too small |
| From: | Eric Sandeen <sandeen@xxxxxxxxxx> |
| Date: | Thu, 29 Nov 2012 12:47:22 -0600 |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
Without this, 273 was failing in cryptic ways for me
if the device size was < 2G.
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 2/4 V2] xfs: byte range granularity for XFS_IOC_ZERO_RANGE, Andrew Dahl |
|---|---|
| Next by Date: | [PATCH] xfstests: fsck scratch device if it got used, Eric Sandeen |
| Previous by Thread: | ThÆ mái tham quan Khu du Lách sinh thÃi ThÃc Giang Äián - Dá Ãn Há Ngác BÃch do CÃng ty Kim Oanh tÃi trá., quynguyen |
| Next by Thread: | Re: [PATCH] xfstests: _fail in _scratch_mkfs_sized if device is too small, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |