diff options
author | Frans Kaashoek <[email protected]> | 2019-07-29 17:33:16 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2019-07-29 17:33:16 -0400 |
commit | 530431045237d7ccbbc0bb65ed83309845c19893 (patch) | |
tree | 6617b13b8e63bb0fd19ff04ac21b8d5e5d9da6b0 /kernel/buf.h | |
parent | 34980381bd75ce28ffea2113559aefa1b02c64f0 (diff) | |
download | xv6-labs-530431045237d7ccbbc0bb65ed83309845c19893.tar.gz xv6-labs-530431045237d7ccbbc0bb65ed83309845c19893.tar.bz2 xv6-labs-530431045237d7ccbbc0bb65ed83309845c19893.zip |
Remove B_DIRTY
Use refcnt to pin blocks into the cache
Replace flags/B_VALID with a boolean field valid
Use info[id].status to signal completion of disk interrupt
Pass a read/write flag to virtio_disk_rw
Diffstat (limited to 'kernel/buf.h')
-rw-r--r-- | kernel/buf.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/buf.h b/kernel/buf.h index 3266495..ae9d264 100644 --- a/kernel/buf.h +++ b/kernel/buf.h @@ -1,5 +1,5 @@ struct buf { - int flags; + int valid; // has data been read from disk? uint dev; uint blockno; struct sleeplock lock; @@ -9,6 +9,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 |