inode (cdfs) -- format of a cdfs inode


   #include <sys/param.h>
   #include <sys/types.h>
   #include <sys/vnode.h>
   #include <sys/fs/cdfs_inode.h>


For each file and directory in a cdfs file system that is currently being referenced, an in-core data structure, struct cdfs_inode, is used to store all of the information related to that file or directory.

The information includes items such as:

The cdfs_inode structure is defined in the cdfs_inode.h header file, and is as follows:

   struct cdfs_inode {
   	struct cdfs_inode	*i_FreeFwd;	/* Free list forward link */
   	struct cdfs_inode	*i_FreeBack;	/* Free list backward link */
   	struct cdfs_inode	*i_HashFwd;	/* Hash list forward link */
   	struct cdfs_inode	*i_HashBack;	/* Hash list backward link */
   	uint_t	i_Flags;	/* Inode flags - See CDFS struct */
   	struct cdfs_fid	i_Fid;	/* File ID info */
   	struct cdfs_fid	i_ParentFid;	/* Parent's File ID info */
   	uid_t	i_UserID;	/* User ID */
   	gid_t	i_GroupID;	/* Group ID */
   	uint_t	i_Mode;	/* File type, Mode, and Perms */
   	uint_t	i_Size;	/* Total # of bytes in file */
   	uint_t	i_LinkCnt;	/* # of links to file */
   	dev_t	i_DevNum;	/* Device # of BLK/CHR file type*/
   	ulong_t	i_LockOwner;	/* Process # of owner of lock */
   	short	i_Count;	/* # of inode locks by lock owner */
   	uint_t	i_DRcount;	/* # of Directory Records */
   	struct vfs	*i_vfs;	/* File sys associated with inode */
   	daddr_t	i_NextByte;	/* Next read-ahead offset (Byte) */
   	int	i_mapsz;	/* kmem_alloc'ed size */
   	long	i_mapcnt;	/* mappings to file pages */
   	struct cdfs_drec	*i_DirRec;	/* 1st link-list Dir Rec of file */
   	struct cdfs_xar	*i_Xar;	/* XAR info from last Dir Rec */
   	struct cdfs_rrip	*i_Rrip;	/* RRIP info from last Dir Rec */
   	struct vnode	*i_Vnode;	/* Vnode associated with Inode */
    	timestruc_t	i_AccessDate;	/* File Access date/time */
   	timestruc_t	i_ModDate;	/* File Modification date/time */
   	timestruc_t	i_CreateDate;	/* File Creation date/time */
   	timestruc_t	i_ExpireDate;	/* File Expiration date/time */
   	timestruc_t	i_EffectDate;	/* File Effective date/time */
   	timestruc_t	i_AttrDate;	/* File Attribute Change date/time */
   	timestruc_t	i_BackupDate;	/* File Backup date/time */
   	struct pathname	i_SymLink;
   	off_t	i_DirOffset;	/* Dir offset of last ref'd entry */
   	ulong	i_VerCode;	/* version code attribute */
   	daddr_t	i_ReadAhead;	/* File offset of read-ahead byte */
   	* The following fields cause storage to be allocated for the
   	* corresponding data structures.  Since each inode will usually
   	* need each of these structures, this is a simple mechanism for
   	* getting the needed storage.  Reference to these structures should
   	* be done via the corresponding pointers allocated above.  Thus,
   	* if the storage is to be dynamically allocated, very little
   	* code needs to change.
   	struct cdfs_drec	i_DirRecStorage;	/* Static storage for i_DirRec */
   	struct cdfs_xar	i_XarStorage;	/* Static storage for i_Xar */
   	struct cdfs_rrip	i_RripStorage;	/* Static storage for i_Rrip */
   	struct vnode	i_VnodeStorage;	/* Static storage for i_Vnode */


cdfs-specific dir_cdfs(4), cdfs-specific fs_cdfs(4)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004