From owner-svn-src-user@freebsd.org Mon Mar 20 11:29:42 2017 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07082D14094 for ; Mon, 20 Mar 2017 11:29:42 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB1FA129D; Mon, 20 Mar 2017 11:29:41 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2KBTeKF083020; Mon, 20 Mar 2017 11:29:40 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2KBTeva083019; Mon, 20 Mar 2017 11:29:40 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201703201129.v2KBTeva083019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 20 Mar 2017 11:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r315634 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2017 11:29:42 -0000 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