2006-07-21 13:18:04 +00:00
|
|
|
struct buf {
|
|
|
|
int flags;
|
2006-08-12 11:38:57 +00:00
|
|
|
uint dev;
|
|
|
|
uint sector;
|
2007-08-24 19:32:36 +00:00
|
|
|
struct buf *prev; // LRU cache list
|
2006-08-12 22:34:13 +00:00
|
|
|
struct buf *next;
|
2007-08-24 19:32:36 +00:00
|
|
|
struct buf *qnext; // disk queue
|
|
|
|
int done;
|
2006-07-21 13:18:04 +00:00
|
|
|
uchar data[512];
|
|
|
|
};
|
2006-09-08 14:36:44 +00:00
|
|
|
#define B_BUSY 0x1 // buffer is locked by some process
|
|
|
|
#define B_VALID 0x2 // buffer contains the data of the sector
|
2007-08-24 19:32:36 +00:00
|
|
|
#define B_WRITE 0x4 // asking device driver to write, else read
|