Skip to content
Snippets Groups Projects
fsvar.h 470 B
Newer Older
rtm's avatar
rtm committed
// in-core file system types

struct inode {
rsc's avatar
rsc committed
  uint dev;           // Device number
  uint inum;          // Inode number
  int ref;            // Reference count
rsc's avatar
 
rsc committed
  int flags;           // I_BUSY, I_VALID
rsc's avatar
rsc committed

  short type;         // copy of disk inode
kaashoek's avatar
kaashoek committed
  short major;
  short minor;
rtm's avatar
rtm committed
  short nlink;
  uint size;
rtm's avatar
rtm committed
  uint addrs[NADDRS];
rtm's avatar
rtm committed
};
rtm's avatar
rtm committed

rsc's avatar
 
rsc committed
// unlocked inode - only dev and inum are available
struct uinode {
  uint dev;
  uint inum;
};
rsc's avatar
 
rsc committed
#define I_BUSY 0x1
#define I_VALID 0x2