From owner-freebsd-current@FreeBSD.ORG Sun May 8 07:44:02 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2501A16A4E1 for ; Sun, 8 May 2005 07:44:02 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D37D43D94 for ; Sun, 8 May 2005 07:44:01 +0000 (GMT) (envelope-from geekout@gmail.com) Received: by wproxy.gmail.com with SMTP id 69so1279006wri for ; Sun, 08 May 2005 00:44:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=d8pSUPqTRB1k47L1f0kreFHUmVqowcHunPqfPr+NovpzMSz48hz9dMQ2bg4/iA/H0tzC0hyg14V3Q9FPHX++6gQQvwyq8IlUloDa58GKxKIMO4qiBif3f2hpG9bXRbC+WouhmKJjirIF5FUyRO3UhygKCjJyahALbz6tySOBcag= Received: by 10.54.21.69 with SMTP id 69mr1798915wru; Sun, 08 May 2005 00:44:00 -0700 (PDT) Received: by 10.54.46.25 with HTTP; Sun, 8 May 2005 00:44:00 -0700 (PDT) Message-ID: <6e01203b050508004410c9a39f@mail.gmail.com> Date: Sun, 8 May 2005 01:44:00 -0600 From: Tyler Gee To: Andre Guibert de Bruet In-Reply-To: <20050508020842.T55534@lexi.siliconlandmark.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050508020842.T55534@lexi.siliconlandmark.com> cc: current@freebsd.org Subject: Re: The "unmount of /dev failed (BUSY)" message, explained X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Tyler Gee List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2005 07:44:02 -0000 Nice, good work. I had been wondering about that one... On 5/8/05, Andre Guibert de Bruet wrote: > Folks, >=20 > In a show of way too much free time, I set off on a quest to figure out > what was up with the "unmount of /dev failed (BUSY)" message that is seen > on reboot. I am pleased to announce that I found what I believe to be the > reason behind the message: >=20 > vfs_unmountall: Processing /dev/amrd1a: > vfs_unmountall: Processing /dev/amrd0s1d: > vfs_unmountall: Processing /dev/amrd0s1f: > vfs_unmountall: Processing /dev/amrd0s1e: > vfs_unmountall: Processing devfs: > 0xc53efcc0: tag devfs, type VCHR > usecount 1, writecount 0, refcount 22 mountedhere 0xc53d4c00 > flags () > v_object 0xc10608c4 ref 0 pages 72 >=20 > dev amrd0s1a > 0xc5442550: tag devfs, type VCHR > usecount 1, writecount 0, refcount 1 mountedhere 0xc53d4b00 > flags () >=20 > dev amrd0s1b > unmount of /dev failed (BUSY) > vfs_unmountall: Processing /dev/amrd0s1a: > 0xc53efaa0: tag ufs, type VDIR > usecount 1, writecount 0, refcount 1 mountedhere 0xc5396800 > flags () >=20 > ino 32896, on dev amrd0s1a > 0xc53ef880: tag ufs, type VREG > usecount 3, writecount 0, refcount 5 mountedhere 0 > flags (VV_TEXT) > v_object 0xc1060738 ref 2 pages 89 >=20 > ino 16527, on dev amrd0s1a > Uptime: 12m8s >=20 > The patch that produces this output is available from: > http://bling.properkernel.com/freebsd/vfs_unmountalldiag.diff >=20 > As you can see from the output, the unmount of /dev fails because the > /dev/amrd0s1a (Which is the root mountpoint on this system) and > /dev/amrd0s1b (Primary swap) device nodes still exist. The logic that we > have that uses reverse TAILQ unmounting is flawed because the root > filesystem is mounted read-only before devfs. >=20 > I will be cleaning up my patch a bit before I submit it to be committed. = I > will also be producing a patch that will make vfs_unmountall do the right > thing. >=20 > I haven't found a way to make it vacuum my apartment yet but I will submi= t > that functionality to ACME Labs when it's available... ;-) >=20 > Andy >=20 > PS: If you want to cross-reference the filesystems, the list is here: > http://bling.properkernel.com/freebsd/fstab >=20 > /* Andre Guibert de Bruet * 6f43 6564 7020 656f 2e74 4220 7469 6a20 */ > /* Code poet / Sysadmin * 636f 656b 2e79 5320 7379 6461 696d 2e6e */ > /* GSM: +1 734 846 8758 * 5520 494e 2058 6c73 7565 6874 002e 0000 */ > /* WWW: siliconlandmark.com * Tormenting bytes since 1980. */ > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= " >