2006-07-21 13:18:04 +00:00
|
|
|
// in-core file system types
|
|
|
|
|
|
|
|
struct inode {
|
2006-09-07 15:31:33 +00:00
|
|
|
uint dev; // Device number
|
|
|
|
uint inum; // Inode number
|
|
|
|
int ref; // Reference count
|
2007-08-24 19:52:49 +00:00
|
|
|
int flags; // I_BUSY, I_VALID
|
2006-09-07 15:31:33 +00:00
|
|
|
|
|
|
|
short type; // copy of disk inode
|
2006-08-08 18:07:37 +00:00
|
|
|
short major;
|
|
|
|
short minor;
|
2006-07-21 13:18:04 +00:00
|
|
|
short nlink;
|
|
|
|
uint size;
|
2006-08-25 01:11:30 +00:00
|
|
|
uint addrs[NADDRS];
|
2006-07-21 13:18:04 +00:00
|
|
|
};
|
2006-07-21 22:10:40 +00:00
|
|
|
|
2007-08-22 06:01:32 +00:00
|
|
|
// unlocked inode - only dev and inum are available
|
|
|
|
struct uinode {
|
|
|
|
uint dev;
|
|
|
|
uint inum;
|
|
|
|
};
|
2006-08-13 12:22:44 +00:00
|
|
|
|
2007-08-21 19:22:08 +00:00
|
|
|
#define I_BUSY 0x1
|
|
|
|
#define I_VALID 0x2
|