Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2018 07:38:32 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r330535 - user/pho/stress2/misc
Message-ID:  <201803060738.w267cWY2015260@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Tue Mar  6 07:38:32 2018
New Revision: 330535
URL: https://svnweb.freebsd.org/changeset/base/330535

Log:
  Do not spin forever on a failing umount(1).
  
  Sponsored by:	Dell EMC Isilon

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

Modified: user/pho/stress2/misc/graid1.sh
==============================================================================
--- user/pho/stress2/misc/graid1.sh	Tue Mar  6 07:36:39 2018	(r330534)
+++ user/pho/stress2/misc/graid1.sh	Tue Mar  6 07:38:32 2018	(r330535)
@@ -63,8 +63,11 @@ export runRUNTIME=10m
 export RUNDIR=$mntpoint/stressX
 
 su $testuser -c 'cd ..; ./run.sh marcus.cfg'
-while mount | grep $mntpoint | grep -q /mirror/; do
-	umount $mntpoint || sleep 1
+for i in `jot 6`; do
+	mount | grep -q "on $mntpoint " || break
+	umount $mntpoint && break || sleep 10
+	[ $i -eq 6 ] &&
+	    { echo FATAL; fstat -mf $mntpoint; exit 1; }
 done
 checkfs /dev/mirror/data || s=1
 gmirror stop data || s=2



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803060738.w267cWY2015260>