Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Aug 1999 23:18:06 +0900 (JST)
From:      Michael Hancock <michaelh@cet.co.jp>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        wrstuden@nas.nasa.gov, Matthew.Alton@anheuser-busch.com, Hackers@FreeBSD.ORG, fs@FreeBSD.ORG
Subject:   Re: BSD XFS Port & BSD VFS Rewrite
Message-ID:  <Pine.BSF.3.95LJ1.1b3.990817224323.17508B-100000@sv01.cet.co.jp>
In-Reply-To: <199908170231.TAA08526@usr02.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > I'm not familiar with the VFS_default stuff. All the vop_default_desc
> > routines in NetBSD point to error routines.
> 
> In FreeBSD, they now point to default routines that are *not* error
> routines.  This is the problem.  I admit the change was very well
> intentioned, since it made the code a hell of a lot more readable,
> but choosing between readable and additional function, I take function
> over form (I think the way I would have "fixed" the readability is by
> making the operations that result in the descriptor set for a mounted
> FS instance be both discrete, and named for their specific function).

As I recall most of FBSD's default routines are also error routines, if
the exceptions were a problem it would would be trivial to fix.

I think fixing resource allocation/deallocation for things like vnodes,
cnbufs, and locks are a higher priority for now.  There are examples such
as in detached threading where it might make sense for the detached child
to be responsible for releasing resources allocated to it by the parent,
but in stacking this model is very messy and unnatural.  This is why the
purpose of VOP_ABORTOP appears to be to release cnbufs but this is really
just an ugly side effect.  With stacking the code that allocates should be
the code that deallocates. Substitute, "code"  with "layer" to be more
correct. 

I fixed a lot of the vnode and locking cases, unfortunately the ones that
remain are probably ugly cases where you have to reacquire locks that had
to be unlocked somewhere in the executing layer.  See VOP_RENAME for an
example.  Compare the number of WILLRELEs in vnode_if.src in FreeBSD and
NetBSD, ideally there'd be none.

Regards,


Mike Hancock




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95LJ1.1b3.990817224323.17508B-100000>