From owner-freebsd-hackers Sat Dec 22 14:12:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id AB0DB37B416 for ; Sat, 22 Dec 2001 14:12:30 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 3601B81E0C; Sat, 22 Dec 2001 16:12:25 -0600 (CST) Date: Sat, 22 Dec 2001 16:12:25 -0600 From: Alfred Perlstein To: Lamont Granquist Cc: freebsd-hackers@freebsd.org Subject: Re: The care and feeding of Vnodes? Message-ID: <20011222161225.B48837@elvis.mu.org> References: <200112222032.fBMKWHH00532@Yorick.> <20011222134326.X386-100000@coredump.scriptkiddie.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011222134326.X386-100000@coredump.scriptkiddie.org>; from lamont@scriptkiddie.org on Sat, Dec 22, 2001 at 02:07:02PM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Lamont Granquist [011222 16:06] wrote: > > So, yesterday I was playing around with the VFS code and trying to figure > out how to get a 'stub' of a filesystem that I could mount and unmount. > To do so I need to implement vfs_root() which requires returning a vnode > for the root of the filesystem. So, I just called getnewvnode(), passing > it some 'stubby' vfsops that would just printf() whenever they were > called. That way I thought I could figure out what was getting done to > the vnode. I didn't do any other initialization to the vnode. > > So, I mounted the filesystem this way, and tried to unmount it and I got a > couple of vnops further into getting the filesystem to unmount. However, > a few minutes later my laptop locked up, and upon rebooting I got > softupdate inconsistencies and filesystem corruption. How did I manage to > hose my system this badly just playing around with one vnode? And what > should I do in order to pass back this kind of "fake" root vnode that > isn't backed up by any actual filestore? Most likely your misbehaving VOPs caused corruption of other data. Without source to your failed experiment it will be hard to determine what the problem is. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message