You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
326 B
15 lines
326 B
struct buf {
|
|
int flags;
|
|
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];
|
|
};
|
|
#define B_VALID 0x2 // buffer has been read from disk
|
|
#define B_DIRTY 0x4 // buffer needs to be written to disk
|
|
|