]> Devi Nivas Git - cs3210-lab0.git/commitdiff
nothing much
authorRobert Morris <rtm@csail.mit.edu>
Wed, 9 Aug 2017 18:16:55 +0000 (14:16 -0400)
committerRobert Morris <rtm@csail.mit.edu>
Wed, 9 Aug 2017 18:16:55 +0000 (14:16 -0400)
bio.c
fs.c
log.c

diff --git a/bio.c b/bio.c
index a61ff72915dbb67d0d44c82e4a20d832e2d3cd5b..a45ff3ef0fe83006e593f423c821f562fd6d91d5 100644 (file)
--- a/bio.c
+++ b/bio.c
@@ -99,7 +99,7 @@ bread(uint dev, uint blockno)
   struct buf *b;
 
   b = bget(dev, blockno);
-  if(!(b->flags & B_VALID)) {
+  if((b->flags & B_VALID) == 0) {
     iderw(b);
   }
   return b;
diff --git a/fs.c b/fs.c
index 8fb09efd88d0b363587a7f4dba89fa9f19f10fd9..1ada466b109040117dae595d8ae3641b192f3b5a 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -190,7 +190,7 @@ static struct inode* iget(uint dev, uint inum);
 
 //PAGEBREAK!
 // Allocate an inode on device dev.
-// Give it type type.
+// Mark it as allocated by  giving it type type.
 // Returns an unlocked but allocated and referenced inode.
 struct inode*
 ialloc(uint dev, short type)
diff --git a/log.c b/log.c
index 9ba3cedba678f5844df67d523d4fdc754c82831e..a64c0f6b403622ad4b53775734c14af53447e0f8 100644 (file)
--- a/log.c
+++ b/log.c
@@ -155,7 +155,9 @@ end_op(void)
     do_commit = 1;
     log.committing = 1;
   } else {
-    // begin_op() may be waiting for log space.
+    // begin_op() may be waiting for log space,
+    // and decrementing log.outstanding has decreased
+    // the amount of reserved space.
     wakeup(&log);
   }
   release(&log.lock);