*BSD News Article 70324


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.uwa.edu.au!disco.iinet.net.au!news.uoregon.edu!vixen.cso.uiuc.edu!newsfeed.internetmci.com!EU.net!usenet1.news.uk.psi.net!uknet!dispatch.news.demon.net!demon!jraynard.demon.co.uk!not-for-mail
From: james@jraynard.demon.co.uk (James Raynard)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Boot Manager Questions
Date: 6 Jun 1996 11:15:13 -0000
Organization: A FreeBSD Box
Lines: 32
Message-ID: <4p6ek1$o8p@jraynard.demon.co.uk>
References: <4ok7gv$d37@earth.alpha.net> <31adfdae.13807413@news.panix.com> <4p1iro$n5@anorak.coverform.lan>
NNTP-Posting-Host: localhost.demon.co.uk
X-NNTP-Posting-Host: jraynard.demon.co.uk

In article <4p1iro$n5@anorak.coverform.lan>,
Brian Somers <brian@awfulhak.demon.co.uk> wrote:

>I suggested at one point that I would write an HPFS for FreeBSD.  I failed.
>I got too bogged down understanding what a vnode was to actually get to
>the point.  Jordan will know if anyone else has volunteered.

I found the key to understanding this kind of thing was to think of it
in C++ terms - all it is really is OOP done in C. 

A vnode is like an abstract base class representing a file; it contains
file-system independent data fields and pointers to functions. One of
the data fields points to somewhere where you can put FS-dependent
data for your system (like data fields in a derived class) and another
one points to a struct where you can put pointers to functions that do
things that are needed for your FS (like virtual member functions).

There's also a vfs struct that works in the same way, but for the
filesystem itself.

"Unix Internals" by Valhalia is a very good book on this kind of
thing.

On the subject of volunteers, if anyone does fancy writing a file
system, just drop a message to freebsd-hackers@freebsd.org.
Incidentally, there's a discussion going on there now about
resuscitating LFS (the logging file system).

-- 
James Raynard, Edinburgh, Scotland | http://freefall.freebsd.org/~jraynard/
james@jraynard.demon.co.uk         | jraynard@freebsd.org