Date: Mon, 20 Mar 2017 11:29:40 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r315634 - user/pho/stress2/misc Message-ID: <201703201129.v2KBTeva083019@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Mon Mar 20 11:29:40 2017 New Revision: 315634 URL: https://svnweb.freebsd.org/changeset/base/315634 Log: Don't loop forever on umount(1). Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/trim.sh Modified: user/pho/stress2/misc/trim.sh ============================================================================== --- user/pho/stress2/misc/trim.sh Mon Mar 20 11:12:31 2017 (r315633) +++ user/pho/stress2/misc/trim.sh Mon Mar 20 11:29:40 2017 (r315634) @@ -42,7 +42,7 @@ mdconfig -l | grep -q md$mdstart && mdc size="128m" [ `uname -m` = "amd64" ] && size="1g" [ $# -eq 0 ] && trim=-t -n=0 +s=0 opt="" [ "$newfs_flags" = "-U" ] && opt="-U -j" for flag in ' ' $opt; do @@ -52,7 +52,7 @@ for flag in ' ' $opt; do echo "newfs $trim $flag md${mdstart}$part" newfs $trim $flag md${mdstart}$part > /dev/null - mount /dev/md${mdstart}$part $mntpoint + mount /dev/md${mdstart}$part $mntpoint || exit 1 chmod 777 $mntpoint export runRUNTIME=10m @@ -60,11 +60,13 @@ for flag in ' ' $opt; do su $testuser -c 'cd ..; ./run.sh marcus.cfg' > /dev/null 2>&1 - while mount | grep $mntpoint | grep -q /dev/md; do - umount $mntpoint || sleep 1 + for i in `jot 6`; do + umount $mntpoint && break || sleep 10 done + [ $i -eq 6 ] && { s=1; break; } checkfs /dev/md${mdstart}$part mdconfig -d -u $mdstart done rm -f /tmp/fsck.log [ $malloc_wait != 1 ] && sysctl vm.md_malloc_wait=$malloc_wait +exit $s
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703201129.v2KBTeva083019>