2 /* affects on-disk structure */
5 SUPERMAGIC = 0x6E0DE51C,
15 /* affects just run-time behaviour */
19 BUFHASH = (1<<BUFHASHBITS)-1,
23 NOUID = (short)0x8000,
28 typedef struct Buf Buf;
29 typedef struct Dev Dev;
30 typedef struct BufReq BufReq;
31 typedef struct ThrData ThrData;
32 typedef struct Superblock Superblock;
33 typedef struct Dentry Dentry;
34 typedef struct Chan Chan;
35 typedef struct FLoc FLoc;
36 typedef struct Loc Loc;
37 typedef struct User User;
39 #pragma incomplete struct User
40 #pragma varargck type "T" int
41 #pragma varargck type "T" uint
72 uvlong size; /* bytes for files and blocks for dirs */
80 DENTRYSIZ = NAMELEN + 4 * sizeof(ushort) + 13 + (3 + NDIRECT + NINDIRECT) * sizeof(uvlong),
81 DEPERBLK = RBLOCK / DENTRYSIZ,
82 /* Given any opportunity to make a breaking change to hjfs,
83 * make this 12 an 8. Indirect offsets to blocks used to
84 * hold an incrementing 4 byte generation number. That
87 OFFPERBLK = RBLOCK / 12,
89 REFPERBLK = RBLOCK / REFSIZ,
90 REFSENTINEL = (1 << 8*REFSIZ) - 1,
102 BWRITE = 1, /* used only for the worker */
103 BWRIM = 2, /* write immediately after putbuf */
104 BDELWRI = 4, /* write delayed */
113 uvlong offs[OFFPERBLK];
114 ulong refs[REFPERBLK];
117 /* do not use anything below (for the bufproc only) */
124 ulong callerpc; /* debugging */
136 Buf buf[BUFHASH+1]; /* doubly-linked list */
182 Loc *rootloc, *dumprootloc;
224 extern Rendez chanre;
228 extern char Enotadir[];
229 extern char Enoent[];
230 extern char Einval[];
232 extern char Eexists[];
233 extern char Elocked[];
235 enum { /* getblk modes */
242 #define HOWMANY(a) (((a)+(RBLOCK-1))/RBLOCK)