From owner-svn-src-head@FreeBSD.ORG Mon Mar 30 09:04:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0462C58; Mon, 30 Mar 2015 09:04:05 +0000 (UTC) Received: from mail-qc0-x22f.google.com (mail-qc0-x22f.google.com [IPv6:2607:f8b0:400d:c01::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 669ADD89; Mon, 30 Mar 2015 09:04:05 +0000 (UTC) Received: by qcay5 with SMTP id y5so64918589qca.1; Mon, 30 Mar 2015 02:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JkAjPH+beLusqvRSFJO4ZcLKnUJ9RRxMsr8LFxCXyUM=; b=xEd4HlP28ZvGO4Pwd253zsMET59DcHRW73TUD3sNdDIEsO+9bibPstprO5Ivg+JT9y 4C4vpM9wAIFUrYJqir29alcfDbxz3rICbAHsuG3nvELEcK7/iEkdkgkv5dXocM7MR1sd v25fQEXBMpptfEnCviTxPYDEj8wcWDv+G4Dfi/qNqMVcm8Xk/91GdsUnFMK4yBqN6ziT 1SEh+AsHi76rNt9wNEVTt2OSL0LYMUKpc7wo1d/Sn8qVZFq+WQYAHIdK/dZ4AKWtoYuP pbUqJIqQGo1M2wdtneMfLWxXGIdvTuU9ejW5jwy1OVap5IIWLcaw4tlqvgbBM12GfW4D klOw== MIME-Version: 1.0 X-Received: by 10.140.41.113 with SMTP id y104mr38038560qgy.25.1427706244612; Mon, 30 Mar 2015 02:04:04 -0700 (PDT) Received: by 10.140.94.99 with HTTP; Mon, 30 Mar 2015 02:04:04 -0700 (PDT) In-Reply-To: References: <201503300833.t2U8XKfe056489@svn.freebsd.org> Date: Mon, 30 Mar 2015 02:04:04 -0700 Message-ID: Subject: Re: svn commit: r280840 - head/release/tools From: NGie Cooper To: Colin Percival Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2015 09:04:05 -0000 On Mon, Mar 30, 2015 at 2:03 AM, NGie Cooper wrote: > On Mon, Mar 30, 2015 at 1:33 AM, Colin Percival 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 I meant: [ -c "${DESTDIR}/dev/null" ]