xv6-65oo2/kernel/buf.h
Frans Kaashoek 5304310452 Remove B_DIRTY
Use refcnt to pin blocks into the cache
Replace flags/B_VALID with a boolean field valid
Use info[id].status to signal completion of disk interrupt
Pass a read/write flag to virtio_disk_rw
2019-07-29 17:33:16 -04:00

13 lines
247 B
C

struct buf {
int valid; // has data been read from disk?
uint dev;
uint blockno;
struct sleeplock lock;
uint refcnt;
struct buf *prev; // LRU cache list
struct buf *next;
struct buf *qnext; // disk queue
uchar data[BSIZE];
};