Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Dec 2001 14:07:02 -0800 (PST)
From:      Lamont Granquist <lamont@scriptkiddie.org>
To:        <freebsd-hackers@freebsd.org>
Subject:   The care and feeding of Vnodes?
Message-ID:  <20011222134326.X386-100000@coredump.scriptkiddie.org>
In-Reply-To: <200112222032.fBMKWHH00532@Yorick.>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011222134326.X386-100000>