2006-07-21 15:18:04 +02:00
|
|
|
// in-core file system types
|
|
|
|
|
|
|
|
struct inode {
|
2006-09-07 17:31:33 +02:00
|
|
|
uint dev; // Device number
|
|
|
|
uint inum; // Inode number
|
|
|
|
int ref; // Reference count
|
2007-08-24 21:52:49 +02:00
|
|
|
int flags; // I_BUSY, I_VALID
|
2006-09-07 17:31:33 +02:00
|
|
|
|
|
|
|
short type; // copy of disk inode
|
2006-08-08 20:07:37 +02:00
|
|
|
short major;
|
|
|
|
short minor;
|
2006-07-21 15:18:04 +02:00
|
|
|
short nlink;
|
|
|
|
uint size;
|
2006-08-25 03:11:30 +02:00
|
|
|
uint addrs[NADDRS];
|
2006-07-21 15:18:04 +02:00
|
|
|
};
|
2006-07-22 00:10:40 +02:00
|
|
|
|
2007-08-21 21:22:08 +02:00
|
|
|
#define I_BUSY 0x1
|
|
|
|
#define I_VALID 0x2
|
2007-08-28 07:00:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Blank page.
|