Skip to contentSkip to conversation

xfstests: Add JFS support to _scratch_mkfs_sized

PATCH New Michael L. Semon 1 participant 1 message Sep 6, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 xfstests: Add JFS support to _scratch_mkfs_sized

This code works, with a little bit of tinkering. I wanted to shovel it off to another function but didn't know what to do with the arguments. In particular, the number_of_blocks value has to come after the dev name.

Thanks!

Michael

Quoted 1 line

From cb46931b9313d001813be459f829f551d955d781 Mon Sep 17 00:00:00 2001

From: "Michael L. Semon" <[email protected]>
Date: Fri, 6 Sep 2013 05:50:05 -0400
Subject: [PATCH 2/2] xfstests: Add JFS support to _scratch_mkfs_sized

Add _scratch_mkfs_sized support for JFS. Calculations are here due to a jfs_mkfs log calculation issue when the file system size is smaller than the partition size. This issue is avoided by specifying the log size (in megabytes) on the command line.

---
 common/rc | 9 +++++++++
 1 file changed, 9 insertions(+)
common/rc +9 -0
index 191e9e5..58997d7 100644
@@ -612,6 +612,15 @@ _scratch_mkfs_sized()
     btrfs)
 	$MKFS_BTRFS_PROG $MKFS_OPTIONS -b $fssize $SCRATCH_DEV
 	;;
+    jfs)
+	_scratch_options mkfs
+        jfs_log_sized=`expr $fssize / 16777216`
+	if `expr $jfs_log_sized \> 128`; then
+	    jfs_log_sized=128
+	fi
+	$MKFS_JFS_PROG -s $jfs_log_sized $SCRATCH_OPTIONS $MKFS_OPTIONS \
+	     $SCRATCH_DEV `expr $fssize / 4096` > /dev/null
+        ;;
     *)
 	_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
 	;;
Signature · 6 lines
1.8.3.2

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs