Subject: Re: RFC: new mode bits in stat structure
To: Jason Thorpe <>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: tech-kern
Date: 06/26/1998 10:24:54
>For the HSM we're building on NetBSD/alpha, I need a couple of additional
>mode bits to indicate two separate additional file states:
>	- File has been archived

	Don't we already have this? From <sys/stat.h>
#define SF_ARCHIVED     0x00010000      /* file is archived */

and chflags(1) knows about it. I don't know if anything uses this
flag, so I've no idea if its intended semantics are different from

>	- File is not resident on disk

	It feels a little bit weird to use flags for these. I think
that's because they seem like part of the internal implementation of a
filesystem (the HSM), but the interface to them is exposed to
userspace. What happens to my HSM system if I start using chflags(2)
to frob these bits? If I turn off the "File is not resident" bit, what
do I get when I read the file? Or, if I'm writing a backup utility, I
might grab the stat structure and then the file - but reading the file
will cause the stat structure to become invalid. If I then write back
the same information, I will have a existing file with the
non-resident bit set, which is bizzare. 

	My $0.02. 

	- Nathan