Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Mar 1998 19:58:56 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        dima@tejblum.dnttm.rssi.ru (Dmitrij Tejblum)
Cc:        nate@mt.sri.com, tlambert@primenet.com, current@FreeBSD.ORG
Subject:   Re: vnode_pager: *** WARNING *** stale FS code in system
Message-ID:  <199803091958.MAA23552@usr05.primenet.com>
In-Reply-To: <199803091047.NAA03211@tejblum.dnttm.rssi.ru> from "Dmitrij Tejblum" at Mar 9, 98 01:47:12 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> Stacking layers *is not* an analogy of inheritance. Stacking layers is 
> analogy of event-passing in GUI, or "filters" in Unix pipes, or some 
> such. Every widget, of course, must handle every possible event.

Or know how to pass it to a lower layer, VOP's being the event type
and argument decriptors being the events.


> But some 
> widget are designed especially to dispatch events to other widgets. 
> This dispatching is a way of handling. Both widgets are finished stuff, 
> unlike a derived class without a base class. Or, as example of a layer, 
> consider a program that read a text file, handle lines started with '#', 
> and print other lines in slightly modified form to output. It is a finished 
> program too. You cannot say that it inherit from the program which 
> read and handle its output.
> 
> But there is real inheritance in filesystems. For example, FIFOs in 
> FFS, FIFOs in NFS, FIFOs in CD9660, etc. is all derived from a generic 
> FIFO.

This is true.  fifofs and specfs are special cases because they
are named in the common namespace.  This is brain damage we will
have to live with for a while (Julian has fixed the specfs damage
using devfs; you don't need the namespace incursion to get devices
any more; the fifo incursions are harder to deal with).

The FFS/UFS inheritance is both more and less problematic.  More,
because it is so fundamental to the system.  Less, because it's
*almost* sufficiently abstract.  Kirk's stated intent in the
seperation was to provide a flat inode namespace.  Some of this has
been recently broken (via default vops and other changes), and some
of it never worked (specifically, the mechanism whereby UFS gets
it's naming relies on an FS specific directory node acquisition).

The real reason for UFS/FFS explicit inheritance is so that you don't
have to use "mount" to assemble an FFS from pieces.


> Terry wants that all filesystems handle GETPAGES/PUTPAGES. This is 
> fine. I simple don't like that he put his 'default' junk in zillion 
> filesystems, instead of put it in an appropriate base class.

It's not "an apropriate base class".  A base class consisting of
anything other than EOPNOTSUPP is pretty much broken.  Read the
BSD4.4 Stacking Architecture design document, I keep posting its URL.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.

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



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