svn commit: r332666 - user/pho/stress2/misc

Peter Holm pho at FreeBSD.org
Wed Apr 18 11:27:23 UTC 2018


Author: pho
Date: Wed Apr 18 11:27:22 2018
New Revision: 332666
URL: https://svnweb.freebsd.org/changeset/base/332666

Log:
  Added missing umounts @ exit. Style fixes.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/misc/crossmp3.sh

Modified: user/pho/stress2/misc/crossmp3.sh
==============================================================================
--- user/pho/stress2/misc/crossmp3.sh	Wed Apr 18 11:24:57 2018	(r332665)
+++ user/pho/stress2/misc/crossmp3.sh	Wed Apr 18 11:27:22 2018	(r332666)
@@ -53,8 +53,9 @@ if [ $# -eq 0 ]; then
 	for i in `jot $mounts`; do
 		m=$(( i + mdstart - 1 ))
 		[ ! -d ${mntpoint}$m ] &&
-		    { mkdir ${mntpoint}$m;  chmod 755 ${mntpoint}$m; }
-		mount | grep "${mntpoint}$m" | grep -q md$m && umount ${mntpoint}$m
+		    { mkdir ${mntpoint}$m; chmod 755 ${mntpoint}$m; }
+		mount | grep "${mntpoint}$m " | grep -q md$m &&
+		    umount ${mntpoint}$m
 		mdconfig -l | grep -q md$m && mdconfig -d -u $m
 
 		mdconfig -a -t swap -s ${size}m -u $m
@@ -73,6 +74,10 @@ if [ $# -eq 0 ]; then
 
 	for i in `jot $mounts`; do
 		m=$(( i + mdstart - 1 ))
+		while mount | grep -q "on ${mntpoint}$m "; do
+		    umount ${mntpoint}$m && break
+		    sleep 1
+		done
 		mdconfig -d -u $m
 	done
 	exit 0


More information about the svn-src-user mailing list