summaryrefslogtreecommitdiff
path: root/kernel/buf.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/buf.h')
-rw-r--r--kernel/buf.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/buf.h b/kernel/buf.h
index 3266495..4a3a39d 100644
--- a/kernel/buf.h
+++ b/kernel/buf.h
@@ -1,5 +1,6 @@
struct buf {
- int flags;
+ int valid; // has data been read from disk?
+ int disk; // does disk "own" buf?
uint dev;
uint blockno;
struct sleeplock lock;
@@ -9,6 +10,4 @@ struct buf {
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