svn commit: r258985 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Thu Dec 5 15:05:51 UTC 2013
Author: pho
Date: Thu Dec 5 15:05:51 2013
New Revision: 258985
URL: http://svnweb.freebsd.org/changeset/base/258985
Log:
Clean up old shell script, use newfs_flags for newfs(8).
Sponsored by: EMC / Isilon storage division
Modified:
user/pho/stress2/misc/unionfs3.sh
Modified: user/pho/stress2/misc/unionfs3.sh
==============================================================================
--- user/pho/stress2/misc/unionfs3.sh Thu Dec 5 14:45:39 2013 (r258984)
+++ user/pho/stress2/misc/unionfs3.sh Thu Dec 5 15:05:51 2013 (r258985)
@@ -33,20 +33,22 @@
# Test with interchanged arguments to mount_unionfs
# Causes page fault in vfs_mount.c:1975
-D=/usr/tmp/diskimage
-truncate -s 256M $D
+. ../default.cfg
-mount | grep "/mnt" | grep md0c > /dev/null && umount /mnt
-mdconfig -l | grep md0 > /dev/null && mdconfig -d -u 0
+truncate -s 256M $diskimage
-mdconfig -a -t vnode -f $D -u 0
-bsdlabel -w md0 auto
-newfs -U md0c > /dev/null
-mount /dev/md0c /mnt
-mount -t unionfs -o noatime /tmp /mnt
+mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint
+mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart
+
+mdconfig -a -t vnode -f $diskimage -u $mdstart
+bsdlabel -w md$mdstart auto
+newfs $newfs_flags md${mdstart}$part > /dev/null
+mount /dev/md${mdstart}$part $mntpoint
+mount -t unionfs -o noatime /tmp $mntpoint
umount -f /tmp # panic
mount /tmp
-mount | grep "/mnt" | grep md0c > /dev/null && umount /mnt
-mount | grep "/mnt" | grep md0c > /dev/null && umount -f /mnt
-mdconfig -d -u 0
-rm -f $D
+while mount | grep $mntpoint | grep -q /dev/md; do
+ umount $mntpoint || sleep 1
+done
+mdconfig -d -u $mdstart
+rm -f $diskimage
More information about the svn-src-user
mailing list