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

Peter Holm pho at FreeBSD.org
Tue Apr 24 10:09:25 UTC 2018


Author: pho
Date: Tue Apr 24 10:09:24 2018
New Revision: 332926
URL: https://svnweb.freebsd.org/changeset/base/332926

Log:
  Added missing umount. Style fix.
  
  Sponsored by:	Dell EMC Isilon

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

Modified: user/pho/stress2/misc/crossmp11.sh
==============================================================================
--- user/pho/stress2/misc/crossmp11.sh	Tue Apr 24 10:08:12 2018	(r332925)
+++ user/pho/stress2/misc/crossmp11.sh	Tue Apr 24 10:09:24 2018	(r332926)
@@ -62,7 +62,7 @@ if [ $# -eq 0 ]; then
 		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
+		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
@@ -82,9 +82,13 @@ 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
 else
 	if [ $1 = find ]; then
 		while [ -f $CONT ]; do


More information about the svn-src-user mailing list