svn commit: r228948 - projects/stress2/misc
Peter Holm
pho at FreeBSD.org
Thu Dec 29 11:35:13 UTC 2011
Author: pho
Date: Thu Dec 29 11:35:12 2011
New Revision: 228948
URL: http://svn.freebsd.org/changeset/base/228948
Log:
Use the global configuration file for MD(4) operations. Limit run time to
half an hour.
Modified:
projects/stress2/misc/snap.sh
Modified: projects/stress2/misc/snap.sh
==============================================================================
--- projects/stress2/misc/snap.sh Thu Dec 29 08:27:37 2011 (r228947)
+++ projects/stress2/misc/snap.sh Thu Dec 29 11:35:12 2011 (r228948)
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2008 Peter Holm <pho at FreeBSD.org>
+# Copyright (c) 2008, 2011 Peter Holm <pho at FreeBSD.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -30,24 +30,26 @@
[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1
-mount | grep "/dev/md0 on /mnt" > /dev/null && umount /mnt
+. ../default.cfg
+
+mount | grep -q "/dev/md$mdstart on $mntpoint" && umount $mntpoint
rm -f /tmp/.snap/pho
trap "rm -f /tmp/.snap/pho" 0
-for i in `jot 128`; do
+for i in `jot 2`; do
mksnap_ffs /tmp /tmp/.snap/pho
- mdconfig -a -t vnode -f /tmp/.snap/pho -u 0 -o readonly
- mount -r /dev/md0 /mnt
+ mdconfig -a -t vnode -f /tmp/.snap/pho -u $mdstart -o readonly
+ mount -r /dev/md$mdstart $mntpoint
- ls -l /mnt > /dev/null
+ ls -l $mntpoint > /dev/null
- umount /mnt
- mdconfig -d -u 0
+ umount $mntpoint
+ mdconfig -d -u $mdstart
rm -f /tmp/.snap/pho
done
-for i in `jot 128`; do
+for i in `jot 2`; do
mksnap_ffs /tmp /tmp/.snap/pho
rm -f /tmp/.snap/pho
done
More information about the svn-src-projects
mailing list