2006-07-21 13:18:04 +00:00
|
|
|
struct buf {
|
2019-07-29 21:33:16 +00:00
|
|
|
int valid; // has data been read from disk?
|
2019-07-30 16:53:19 +00:00
|
|
|
int disk; // does disk "own" buf?
|
2006-08-12 11:38:57 +00:00
|
|
|
uint dev;
|
2015-04-03 12:22:02 +00:00
|
|
|
uint blockno;
|
2016-09-11 21:24:04 +00:00
|
|
|
struct sleeplock lock;
|
2016-09-12 00:17:22 +00:00
|
|
|
uint refcnt;
|
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
|
2015-04-03 12:22:02 +00:00
|
|
|
uchar data[BSIZE];
|
2006-07-21 13:18:04 +00:00
|
|
|
};
|
2007-08-27 14:09:30 +00:00
|
|
|
|