Date: Mon, 30 Mar 2015 02:03:27 -0700 From: NGie Cooper <yaneurabeya@gmail.com> To: Colin Percival <cperciva@freebsd.org> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r280840 - head/release/tools Message-ID: <CAGHfRMADYDnStiEaEkka9SZ73F-M9Yf1KVn1JSCJbqCK3j%2Bk7Q@mail.gmail.com> In-Reply-To: <201503300833.t2U8XKfe056489@svn.freebsd.org> References: <201503300833.t2U8XKfe056489@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 30, 2015 at 1:33 AM, Colin Percival <cperciva@freebsd.org> wrote: > Author: cperciva > Date: Mon Mar 30 08:33:19 2015 > New Revision: 280840 > URL: https://svnweb.freebsd.org/changeset/base/280840 > > Log: > Clean up filesystem unmounting in vmimage builds: > * Remove vm_umount_base function which is currently unused. > * Add umount_loop function which loops attempting to unmount one filesystem. > * Replace calls to umount with calls to umount_loop. > * Don't attempt to unmount ${DESTDIR}/dev if it isn't mounted. > > The looping is necessary because sometimes umount fails due to filesystems > being busy. The most common cause of such busyness is periodic(8) jobs > running `find / ...`. > > Reviewed by: gjb > > Modified: > head/release/tools/vmimage.subr > > Modified: head/release/tools/vmimage.subr > ============================================================================== > --- head/release/tools/vmimage.subr Mon Mar 30 07:11:49 2015 (r280839) > +++ head/release/tools/vmimage.subr Mon Mar 30 08:33:19 2015 (r280840) > @@ -45,8 +45,10 @@ err() { > } > > cleanup() { > - umount ${DESTDIR}/dev 2>/dev/null > - umount ${DESTDIR} > + if mount | grep -qE "devfs on ${DESTDIR}/dev"; then > + umount_loop ${DESTDIR}/dev 2>/dev/null > + fi if [ -c "${DESTDIR}/dev" ]; then umount_loop fi etc, is probably more foolproof here.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGHfRMADYDnStiEaEkka9SZ73F-M9Yf1KVn1JSCJbqCK3j%2Bk7Q>