]> Devi Nivas Git - cs3210-lab0.git/commitdiff
stricter log consumption by write()
authorRobert Morris <rtm@csail.mit.edu>
Tue, 24 Oct 2017 12:49:31 +0000 (08:49 -0400)
committerRobert Morris <rtm@csail.mit.edu>
Tue, 24 Oct 2017 12:49:31 +0000 (08:49 -0400)
file.c

diff --git a/file.c b/file.c
index 95cadb374aa71664bc409406440e08b12bb41350..24b32c2da651e77be4fc456da7e50e139d774a4b 100644 (file)
--- a/file.c
+++ b/file.c
@@ -130,7 +130,7 @@ filewrite(struct file *f, char *addr, int n)
     // and 2 blocks of slop for non-aligned writes.
     // this really belongs lower down, since writei()
     // might be writing a device like the console.
-    int max = ((LOGSIZE-1-1-2) / 2) * 512;
+    int max = ((MAXOPBLOCKS-1-1-2) / 2) * 512;
     int i = 0;
     while(i < n){
       int n1 = n - i;