inode(4-ufs) inode(4-ufs)
NAME
inode (ufs) - format of a ufs inode
SYNOPSIS
#include <sys/param.h>
#include <sys/types.h>
#include <sys/vnode.h>
#include <sys/fs/ufsinode.h>
DESCRIPTION
The inode is the focus of all local file activity in Reliant UNIX.
There is a unique inode allocated for each active file, each current
directory, each mounted-on file, each mapping, and the root. An inode
is "named" by its dev/inumber pair. Data in icommon is read in from
permanent inode on the actual volume.
#define EFTMAGIC 0x90909090 /* magic cookie for EFT */
#define NDADDR 12 /* direct addresses in inode */
#define NIADDR 3 /* indirect addresses in inode */
struct inode
{
struct inode *ichain[2];/* must be first */
struct vnode ivnode; /* vnode associated with this inode */
struct vnode *idevvp; /* vnode for block I/O */
ushort iflag;
devt idev; /* device where inode resides */
inot inumber; /* i number, 1-to-1 with device address */
offt idiroff; /* offset in dir, where we found last entry */
struct fs *ifs; /* file sys associated with this inode */
struct dquot *idquot; /* quota structure controlling this file */
short iowner; /* proc index of process locking inode */
short icount; /* number of inode locks for iowner */
short irwowner; /* proc index of process holding rwlock */
daddrt inextr; /* next byte read offset (read-ahead) */
struct inode *ifreef; /* free list forward */
struct inode **ifreeb; /* free list back */
ulong ivcode; /* version code attribute */
ulong imapcnt; /* mappings to file pages */
int *imap; /* block list for the corresponding file */
struct icommon
{
omodet icsmode; /* 0: mode and type of file */
short icnlink; /* 2: number of links to file */
ouidt icsuid; /* 4: owner's user id */
ogidt icsgid; /* 6: owner's group id */
quad icsize; /* 8: number of bytes in file */
Page 1 Reliant UNIX 5.44 Printed 11/98
inode(4-ufs) inode(4-ufs)
#ifdef KERNEL
struct timeval icatime; /* 16: time last accessed */
struct timeval icmtime; /* 24: time last modified */
struct timeval icctime; /* 32: last time inode changed */
#else
timet icatime; /* 16: time last accessed */
long icatspare;
timet icmtime; /* 24: time last modified */
long icmtspare;
timet icctime; /* 32: last time inode changed */
long icctspare;
#endif
daddrt icdb[NDADDR]; /* 40: disk block addresses */
daddrt icib[NIADDR]; /* 88: indirect blocks */
long icflags; /* 100: status, currently unused */
long icblocks; /* 104: blocks actually held */
long icgen; /* 108: generation number */
modet icmode; /* 112: EFT version of mode*/
uidt icuid; /* 116: EFT version of uid */
gidt icgid; /* 120: EFT version of gid */
ulong iceftflag; /* 124: indicate EFT version*/
} iic;
};
struct dinode
{
union
{
struct icommon diicom;
char disize[128];
} diun;
};
SEE ALSO
fs(4-ufs).
Page 2 Reliant UNIX 5.44 Printed 11/98