Subject: Re: RFC: new mode bits in stat structure
To: None <tech-kern@NetBSD.ORG>
From: Ty Sarna <tsarna@endicor.com>
List: tech-kern
Date: 06/30/1998 21:45:03
In article <199806301811.UAA28870@horn.ics.muni.cz>,
Zdenek Salvet  <salvet@ics.muni.cz> wrote:
> > However, this one, I'm not so sure about:
> > #define	S_IFNONRES	0400000		/* file is non-resident */
> 
> I would let the HSM VFS module to manage this information internally
> (e.g. in one database file). It is no use for normal filesystems
> and for special things like HSM you will always need additional special
> attributes that would unnecessarily pollute the interface and you would run

The VFS doesn't care about those other attributes, so they can and
should stay in the HSM database.  The VFS should be very thin, and only
care wether the file is in layer one or not.  A file flag can be tested
much more cheaply than a query to the HSM database.  Also, if the
resident state information is kept in a file flag, then the cache (layer
one) is self-contained in a filesystem.  You can back it up with
dump/restore, etc.  If the state of the cache is split between a file
and a database, there is a significantly larger chance they'll get out
of sync.