1 typedef struct Bbuf Bbuf;
2 typedef struct Bcache Bcache;
6 Nbcache= 32, /* number of blocks kept in pool */
10 * block cache descriptor
14 Lru; /* must be first in struct */
17 Bbuf *next; /* next in dirty list */
28 int bsize; /* block size in bytes */
29 int f; /* fd to disk */
30 Bbuf *dfirst; /* dirty list */
35 int bcinit(Bcache*, int, int);
36 Bbuf* bcalloc(Bcache*, ulong);
37 Bbuf* bcread(Bcache*, ulong);
38 void bcmark(Bcache*, Bbuf*);
39 int bcwrite(Bcache*, Bbuf*);
41 int bread(Bcache*, ulong, void*);
42 int bwrite(Bcache*, ulong, void*);
43 int bref(Bcache*, Bbuf*);
44 void error(char*, ...);