summaryrefslogtreecommitdiff
path: root/bio.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2014-08-28 05:57:47 -0400
committerRobert Morris <[email protected]>2014-08-28 05:57:47 -0400
commit48aa917403de1599a02924e429a9f43ea31e9cc1 (patch)
tree037648a21b395eacdd2d716a33cfc95e14ff0a61 /bio.c
parent71453f72f285a17ccf0520b9dbdafdc701ff2f4a (diff)
downloadxv6-labs-48aa917403de1599a02924e429a9f43ea31e9cc1.tar.gz
xv6-labs-48aa917403de1599a02924e429a9f43ea31e9cc1.tar.bz2
xv6-labs-48aa917403de1599a02924e429a9f43ea31e9cc1.zip
i think this is a working concurrent logging scheme
Diffstat (limited to 'bio.c')
-rw-r--r--bio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bio.c b/bio.c
index de1d0f2..d2ebc4b 100644
--- a/bio.c
+++ b/bio.c
@@ -80,6 +80,8 @@ bget(uint dev, uint sector)
}
// Not cached; recycle some non-busy and clean buffer.
+ // "clean" because B_DIRTY and !B_BUSY means log.c
+ // hasn't yet committed the changes to the buffer.
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
if((b->flags & B_BUSY) == 0 && (b->flags & B_DIRTY) == 0){
b->dev = dev;