[PATCH 2/2] xfstests: Add JFS support to _scratch_mkfs_sized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

>From cb46931b9313d001813be459f829f551d955d781 Mon Sep 17 00:00:00 2001
From: "Michael L. Semon" <mlsemon35@xxxxxxxxx>
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(+)

diff --git a/common/rc b/common/rc
index 191e9e5..58997d7 100644
--- a/common/rc
+++ b/common/rc
@@ -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"
 	;;
-- 
1.8.3.2

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux