inode(4-ufs) inode(4-ufs)
NAME
inode (ufs) - Format eines ufs-I-Node
SYNTAX
#include <sys/param.h>
#include <sys/types.h>
#include <sys/vnode.h>
#include <sys/fs/ufsinode.h>
BESCHREIBUNG
In den I-Nodes sind unter Reliant UNIX sämtliche lokalen Aktivitäten
im Zusammenhang mit Dateien zusammengefaßt. Jeder aktiven Datei ist
ein eindeutiger I-Node zugeordnet, ebenso wie jedem aktiven Verzeich-
nis, jeder eingehängten Datei, jedem Mapping und der Root. Ein I-Node
wird über die Kombination aus Gerätenummer/I-Nummer angegeben. Die
Daten in der icommon-Struktur werden aus dem permanenten I-Node des
tatsächlichen Datenträgers eingelesen.
#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 */
Seite 1 Reliant UNIX 5.44 Gedruckt 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;
};
SIEHE AUCH
fs(4-ufs).
Seite 2 Reliant UNIX 5.44 Gedruckt 11/98