From owner-freebsd-hackers Sat Dec 22 14: 6:28 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from warez.scriptkiddie.org (uswest-dsl-142-38.cortland.com [209.162.142.38]) by hub.freebsd.org (Postfix) with ESMTP id 1F77237B417 for ; Sat, 22 Dec 2001 14:06:26 -0800 (PST) Received: from [192.168.69.11] (unknown [192.168.69.11]) by warez.scriptkiddie.org (Postfix) with ESMTP id A95FD62D01 for ; Sat, 22 Dec 2001 14:06:20 -0800 (PST) Date: Sat, 22 Dec 2001 14:07:02 -0800 (PST) From: Lamont Granquist To: Subject: The care and feeding of Vnodes? In-Reply-To: <200112222032.fBMKWHH00532@Yorick.> Message-ID: <20011222134326.X386-100000@coredump.scriptkiddie.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message