inode(4) — FILE FORMATS
NAME
inode (cdfs) − format of a cdfs inode
SYNOPSIS
#include <sys/types.h>
#include <sys/fs/cdfsinode.h>
DESCRIPTION
An in-memory i-node for a plain file or directory for an cdfs file system has the following structure defined by sys/fs/cdfsinode.h. Note that this is only an in-memory structure and that no similar file exists on the cdrom disc.
/∗ cdfs Inode structure as it appears in memory . ∗/
struct cdinode {
struct cdinode ∗cdi_forw; /∗ inode hash chain ∗/
struct cdinode ∗cdi_back; /∗ " ∗/
ushort cdi_count; /∗ reference count for cdinode ∗/
ushort cdi_flags; /∗ flags defined below ∗/
ushort cdi_flags2; /∗ flags defined below ∗/
ushort cdi_mode; /∗ file type and permissions ∗/
ushort cdi_uid, /∗ Owner and group ∗/
cdi_gid;
dev_t cdi_dev;
long cdi_ino;
long cdi_size; /∗ file size in bytes ∗/
time_t cdi_utime;
uint cdi_nextent; /∗ number of extents ∗/
struct cdextent
∗cdi_extlp; /∗ pointer to extent list ∗/
daddr_t cdi_lastr; /∗ last logical block read ∗/
ushort cdi_contig; /∗ # contig blks to read ∗/
ushort cdi_cntgcnt;
struct cdinode
∗cdi_next; /∗ next free cdinode ∗/
short cdi_nilocks; /∗ count of recursive ilocks ∗/
o_nlink_t
cdi_nlink; /∗ number of links ∗/
u_char cdi_gen; /∗ generation number ∗/
long cdi_mapcnt; /∗ number of mappings of pages ∗/
short cdi_owner; /∗ proc slot of ilock owner ∗/
u_long cdi_vcode; /∗ version code attribute ∗/
u_long cdi_nextr; /∗ next block read ∗/
struct vnode
cdi_vnode; /∗ Contains an instance of a vnode ∗/
int ∗cdi_map; /∗ block list for the corresponding file ∗/
dev_t cdi_rdev; /∗ rdev field for block/char specials ∗/
time_t cdi_atime; /∗ last access time ∗/
time_t cdi_mtime; /∗ last modification time ∗/
time_t cdi_ctime; /∗ last "inode change" time ∗/
u_long cdi_lastlbn; /∗ last read-ahead lbn ∗/
u_long cdi_iwant; /∗ want the cdinode count ∗/
pid_t cdi_lckpid; /∗ lock function code ∗/
pid_t cdi_ulckpid; /∗ unlock function code ∗/
u_long cdi_irwwant; /∗ want the cdinode count ∗/
};
/∗ flags ∗/
#define CDIFREE 0 /∗ CD inode table entry is free ∗/
#define CDIALLOC 1 /∗ CD inode table entry is allocated ∗/
/∗ Flags ∗/
/∗ flags ∗/
#define ILOCKED 0x001 /∗ inode is locked ∗/
#define IUPD 0x002 /∗ file has been modified ∗/
#define IACC 0x004 /∗ inode access time to be updated ∗/
#define IMOD 0x008 /∗ inode has been modified ∗/
#define IWANT 0x010 /∗ some process waiting on lock ∗/
#define ISYNC 0x020 /∗ do all allocation synchronously ∗/
#define ICHG 0x040 /∗ inode has been changed ∗/
#define ILWAIT 0x080 /∗ someone waiting on file lock ∗/
#define IREF 0x100 /∗ inode is being referenced ∗/
#define INOACC 0x200 /∗ no access time update in getpage ∗/
#define IMODTIME 0x400 /∗ mod time already set ∗/
#define IRWLOCKED 0x1000 /∗ inode is rwlocked ∗/
SEE ALSO
— CDFS