[PATCH 1/3] Fix a problem wherein the bsize argument setting to mkfs fails to be included since MKFS_OPTIONS already has bsize.

Chandra Seetharaman sekharan at us.ibm.com
Wed Feb 8 10:02:37 CST 2012


Signed-off-by: Chandra Seetharaman <sekharan at us.ibm.com>
---
 common.rc |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/common.rc b/common.rc
index cab0b64..61889b0 100644
--- a/common.rc
+++ b/common.rc
@@ -350,7 +350,10 @@ _scratch_mkfs_sized()
 
     case $FSTYP in
     xfs)
-	_scratch_mkfs_xfs -d size=$fssize -b size=$blocksize
+	# replace bsize= in MKFS_OPTIONS if already defined
+	export MKFS_OPTIONS=$(echo $MKFS_OPTIONS | \
+			 sed -e "s/-bsize=[0-9]*/-bsize=$blocksize/")
+	_scratch_mkfs_xfs "-d size=$fssize"
 	;;
     ext2|ext3|ext4|ext4dev)
 	/sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
-- 
1.7.1



More information about the xfs mailing list