17 lines
402 B
C
17 lines
402 B
C
#pragma once
|
|
|
|
#include "types.h"
|
|
#include "sleeplock.h"
|
|
#include "fs.h"
|
|
|
|
struct buf {
|
|
int valid; // has data been read from disk?
|
|
int disk; // does disk "own" buf?
|
|
u32 dev;
|
|
u32 blockno;
|
|
struct sleeplock lock;
|
|
u32 refcnt;
|
|
struct buf *prev; // LRU cache list
|
|
struct buf *next;
|
|
u8 data[BSIZE];
|
|
};
|