| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized() |
| From: | Eryu Guan <guaneryu@xxxxxxxxx> |
| Date: | Fri, 4 Nov 2011 10:38:04 +0800 |
| Cc: | Eryu Guan <guaneryu@xxxxxxxxx> |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=C1s18YjCfbhNR+zT5n+6ZWqTP7q7bHzwIplwb2KWNdo=; b=lJMBuTf9VWvR4FxMxLn7W/H5yy/M61PYjIjzGQOWCc8UupOo1u1hM9pB+b0NICppai +widfZdZ/6I7zyhLO9+ak7Xn8JFIdIUWEOXrb5v2+0E03dvreUELm7IjDhLLrLqmEqsc NIsTIKHvLGTeDB7MiihBHR748T+SJWxYYlTgE= |
| In-reply-to: | <1320374284-1534-1-git-send-email-guaneryu@xxxxxxxxx> |
| References: | <1320374284-1534-1-git-send-email-guaneryu@xxxxxxxxx> |
btrfs requires at least 256M file system size, so check 'fssize' in
_scratch_mkfs_sized first and give it a proper value. Otherwise
mkfs.btrfs will complain something like
"File system size 267386880 bytes is too small, 256M is required at least"
This makes 015 077 and 083 run on btrfs.
Signed-off-by: Eryu Guan <guaneryu@xxxxxxxxx>
---
common.rc | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/common.rc b/common.rc
index e948169..ab61786 100644
--- a/common.rc
+++ b/common.rc
@@ -356,6 +356,11 @@ _scratch_mkfs_sized()
/sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
;;
btrfs)
+ # btrfs needs at least 256M file system size
+ if [ $fssize -lt $((256*1024*1024)) ]
+ then
+ fssize=$((256*1024*1024))
+ fi
$MKFS_BTRFS_PROG $MKFS_OPTIONS -b $fssize $SCRATCH_DEV
;;
*)
--
1.7.7.1
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 1/2] xfstests: 083 make variable filesize as size in bytes, Eryu Guan |
|---|---|
| Next by Date: | Re: [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized(), Christoph Hellwig |
| Previous by Thread: | [PATCH 1/2] xfstests: 083 make variable filesize as size in bytes, Eryu Guan |
| Next by Thread: | Re: [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized(), Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |