Subject: Re: RFC: new mode bits in stat structure
To: Ty Sarna <tsarna@endicor.com>
From: Zdenek Salvet <salvet@horn.ics.muni.cz>
List: tech-kern
Date: 07/01/1998 08:58:38
> > > 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.
I agree this method is fast, but the flag is useful only for the proposed
HSM implementation. For HSM that could migrate parts of files or HSM that
must be able to store number of files > cache_size/sizeof(dinode)
it is useless.
If the new flag is unavoidable, I propose this:
#define S_IFAPPSPEC 0400000 /* application specific (e.g. for HSM) */
> 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.
Yes, but for keeping consistency, cache state need not be the same
as user-visible file contents.
Jason Thorpe <thorpej@nas.nasa.gov> wrote:
> > The problem of "ls" display can be handled in general and elegant manner
> > using fs-specific "ls plugins" (see /usr/lib/fs/ on Solaris or mount_* and
> > fsck_* families). The overhead would be only one dlopen() per listed
> > filesystem type.
>
> ...and I will note that on ELF platforms, this only works if ls(1) is
> dynamically linked (because the interpreter is loaded by the kernel.)
Is it difficult or impossible to extend the functionality so that dl*
functions work like in a.out if used in static ELF binary (if ld.so
is not already loaded) ?
--
Zdenek Salvet salvet@ics.muni.cz
----------------------------------------------------------------------------
If God had meant for us to be in the Army,
we would have been born with green, baggy skin.