stricter log consumption by write()

This commit is contained in:
Robert Morris 2017-10-24 08:49:31 -04:00
parent 1ab23170a1
commit 0754d21c86

2
file.c
View file

@ -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;