Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
for f in *.{h,c}; do sed -i .sed 's/[[:blank:]]*$//' $f; done
(Thanks to Nicolás Wolovick)
|
|
- move log into metadata part of disk, so that marking
that the log's blocks are in use falls out for free
- superblock describes the whole disk (sizes and offets)
- sizes and offsets are computed in one place (mkfs) and
the rest of the code refers to the superblock for these values,
instead of recomputing them.
|
|
to show
that they can be different. Clean up mkfs, simplifying specifying fs parameters,
remove some redundancy between fs and mkfs, and fix disk layout bugs. Call blocks
in the file system blocks instead of sectors. Passes usertests for different
block sizes.
|
|
|
|
|
|
|
|
|
|
|
|
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 3a5fa7ed9020eaf8ab843a16d26db7393b2ec072.
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)
|
|
|
|
|
|
usertest for big write()s
push begin_trans/commit_trans down into syscalls
|
|
Passes usertests and stressfs
Seems to recover correctly in a number of simple cases
|
|
[ cherry-picked de6075ff0978108daea1d658425bcb37663a98a0 ]
Conflicts:
fs.c
|
|
|
|
* rename c/cp to cpu/proc
* rename cpu.context to cpu.scheduler
* fix some comments
* formatting for printout
|
|
pdf has very good page breaks now.
would be a good copy for fall 2009.
|
|
|
|
few naming nits.
|
|
|
|
|
|
Suppose an inode has been used and freed.
It is left marked I_VALID (the bug).
Now ialloc comes along and reuses the
inode. It writes the new inode type to disk
and returns iget(dev, inum) to get the
cache entry. Iget sees that the inode is valid
and doesn't bother refreshing from disk.
Now when the caller iupdates, it will write
out a zero type and the file or directory has
disappeared.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
to take inode* instead of minor number.
Unlock console inode during console_read
and console_write. Otherwise background
processes cannot write to console while the
shell is reading it waiting for input.
|
|
|
|
There is only one ref to it -- the caller --
and no links to it.
|
|
|
|
|
|
|
|
Add utility routines bzero, readsb so that balloc, bfree fit on one page.
Make balloc loop clearer.
|
|
|
|
|
|
Remove type arg to mknod (assume T_DEV).
|
|
|
|
nits in comments
|
|
|
|
|
|
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
|
|
|
|
- Got rid of dummy proc[0]. Now proc[0] is init.
- Added initcode.S to exec /init, so that /init is
just a regular binary.
- Moved exec out of sysfile to exec.c
- Moved code dealing with fs guts (like struct inode)
from sysfile.c to fs.c. Code dealing with system call
arguments stays in sysfile.c
- Refactored directory routines in fs.c; should be simpler.
- Changed iget to return *unlocked* inode structure.
This solves the lookup-then-use race in namei
without introducing deadlocks.
It also enabled getting rid of the dummy proc[0].
|