From owner-freebsd-current@FreeBSD.ORG Sun Dec 14 07:59:14 2003 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 100A716A4CF for ; Sun, 14 Dec 2003 07:59:14 -0800 (PST) Received: from smtp.mho.com (smtp.mho.net [64.58.4.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 81D4843D35 for ; Sun, 14 Dec 2003 07:59:10 -0800 (PST) (envelope-from scottl@freebsd.org) Received: (qmail 48125 invoked by uid 1002); 14 Dec 2003 15:59:09 -0000 Received: from unknown (HELO freebsd.org) (64.58.1.252) by smtp.mho.net with SMTP; 14 Dec 2003 15:59:09 -0000 Message-ID: <3FDC887D.9060605@freebsd.org> Date: Sun, 14 Dec 2003 08:57:49 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Lewis References: <200312140716.hBE7G8eF064492@gw.catspoiler.org> In-Reply-To: <200312140716.hBE7G8eF064492@gw.catspoiler.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: mckusick@mckusick.com cc: jroberson@chesapeake.net cc: mb@imp.ch cc: freebsd-current@freebsd.org cc: alc@freebsd.org Subject: Re: HAVE TRACE & DDB Re: FreeBSD 5.2-RC1 released X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2003 15:59:14 -0000 Don Lewis wrote: > Following up to myself ... > > It looks like we're trying to recycle this vnode because of the > following sysinstall code, in distExtractTarball(): > > if (is_base && RunningAsInit && !Fake) { > unmounted_dev = 1; > unmount("/dev", MNT_FORCE); > } else > unmounted_dev = 0; > > I'm guessing that the purpose of this code is to unmount devfs from /dev > so that when the base distribution is unpacked it can populate /dev from > the tarball. This seems wrong, because it looks like the root file > system is mounted on /mnt, and devfs is also mounted on /mnt/dev ... > > What happens if we forceably umount /dev while /dev/whatever holds a > mounted file system? It looks like this is handled by vgonechrl(). It > looks to me like vclean() is going to do some scary stuff to this vnode. > As Jeff pointed out, vfs_subr.c rev 1.461 might be the immediate problem here. However, I can't believe that umounting devfs while it is in use can possibly be the right thing to do. Does devfs have to be mounted in the /mnt? Is it a chroot issue? > BTW, I think the root vnode is the root of the md file system, not the > root of the file system being populated by sysinstall. I don't know why > there would be anything to sync at this point, though. > > I suspect that removing the above sysinstall code will fix the immediate > problem, but there is still much I don't understand. Removing this code will likely result in sysinstall reporting errors to the user about not being able to unpack the files into /dev. Or even worse, it might succeed and temporarily replace the valid entries with invalid ones. Scott