/*static char *SCCSID = "@(#)oldfnode.h	6.1 90/11/18";*/
/*static char *SCCSID = "@(#)oldfnode.h 13.4 90/01/26";*/

/**     Old Fnode block definition
 *
 *	Every file and directory has an FNODE.	The file location
 *	stuff is only used for files; directories are kept in
 *	a BTREE of DIRBLK records pointed to by FN_SEC[0].RSEC
 *
 *      OLDFNODE is used to convert old Fnodes to new Fnodes
 */


typedef struct OLDFNODE {

/*	The following file location information is copied into the OFT
 *	and is used there during normal file access.  The stuff in the
 *	fnode record here may in fact be out of date for open files.
 *	See the OFN_ in the OFT structure THESE TWO AREAS IN THE
 *	RESPECTIVE RECORDS MUST HAVE IDENTICAL FORMATS.
 *
 *	There are two kinds of location info: FNSCNT SPTR records
 *	and then a single, double, triple, and quad indirect block pointer.
 *	The "block threshold" means the first sector number which is
 *	contained in that indirect block heirarchy.  You use this
 *	to quickly find out where to start looking.
 */

    unsigned long sig;	/* signature value */

/*	History tracking info for softer software */

    unsigned long ulSRHist;	/* sequential read history */
    unsigned long ulFRHist;	/* fast read history */
    unsigned long  FN_XXX;
    unsigned char achName[16]; /* 1st 18 bytes of file name */
    unsigned long lsnContDir;	/* fnode of directory cont. this file/dir */
    unsigned short usACLBase;   /* offset of 1st ACE in fnode */

/*	stuff not interesting once opened */

    struct AUXINFO aiACL;	/* access ctl list aux info structure */
    unsigned char cHistBits;	/* count of valid history bits */
    struct AUXINFO aiEA;	/* ea aux info structure */
    unsigned char bFlag;	/* FNODE flag byte */

    FILESTORAGE fst;            /* file storage
				 *   (contains
				 *    FN_AB
				 *    FN_ALREC
                                 *    FN_VLEN)
                                 */
    unsigned long ulRefCount;	/* number of "need" EAs in file */


/*	The following fields are unused in this release, they're for
 *	future compatibility.  When deleting files, if FN_EEL is non-zero
 *	then FN_EEL sectors starting at FN_EEP must be released too.
 */

    unsigned char achUID[16];	/* reserved for UID value */
    unsigned long  FN_EEP;	/* first sector of "extra extent */
    unsigned char  FN_EEL;	/* length, in sectors, of extra extent */
    unsigned char abSpare[7]; /* 7 more bytes emergency spares */

/*	Free pool.  ACLs and EAs are stored here via the AUXINFO structure */

    unsigned char abFree[310];  /* free space for perm and env list; perm list
				   * comes first. */
}OLDFNODE; /* OLDFNODE */
