Use 10 direct block numbers, 2 indirect block numbers and one double
indirect block number to increase the maximum file size to around 8MB.
Using this scheme, we can address a total of blocks
10 + 2 * 128 + 128 * 128 = 16650 blocks or just over 8MB.
My changes have a race with re-used bufs and the code doesn't seem to get shorter
Keep the changes that fixed ip->off race
This reverts commit 3a5fa7ed90.
Conflicts:
defs.h
file.c
file.h
Remove I_BUSY, B_BUSY, and intrans defs and usages
One spinlock per buf to avoid ugly loop in bget
fix race in filewrite (don't update f->off after releasing lock)
Various changes made while offline.
+ bwrite sector argument is redundant; use b->sector.
+ reformatting of files for nicer PDF page breaks
+ distinguish between locked, unlocked inodes in type signatures
+ change FD_FILE to FD_INODE
+ move userinit (nee proc0init) to proc.c
+ move ROOTDEV to param.h
+ always parenthesize sizeof argument