summaryrefslogtreecommitdiff
path: root/fs.c
AgeCommit message (Collapse)AuthorFilesLines
2011-08-29Revert "Introduce and use sleeplocks instead of BUSY flags"Frans Kaashoek1-16/+16
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
2011-08-26Introduce and use sleeplocks instead of BUSY flagsFrans Kaashoek1-16/+16
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)
2011-08-19make dirlookup and dirlink more similarRobert Morris1-18/+13
2011-08-15avoid deadlock by calling begin_trans() before locking any inodesRobert Morris1-4/+3
2011-08-12log write() dataRobert Morris1-2/+2
usertest for big write()s push begin_trans/commit_trans down into syscalls
2011-07-27Dirt simple loggingFrans Kaashoek1-6/+6
Passes usertests and stressfs Seems to recover correctly in a number of simple cases
2011-06-24do not run past the end of the disk!Nickolai Zeldovich1-1/+1
[ cherry-picked de6075ff0978108daea1d658425bcb37663a98a0 ] Conflicts: fs.c
2009-10-24Comment typoAustin Clements1-1/+1
2009-08-30assorted fixes:Russ Cox1-2/+2
* rename c/cp to cpu/proc * rename cpu.context to cpu.scheduler * fix some comments * formatting for printout
2009-08-08shuffle and tweak for formatting.Russ Cox1-2/+1
pdf has very good page breaks now. would be a good copy for fall 2009.
2009-07-11rearrangements and cleanup for textRuss Cox1-49/+50
2009-05-31group locks into structs they protect.rsc1-1/+1
few naming nits.
2009-05-31fix bug fixrsc1-2/+2
2009-05-31tidy fs.c; bmap callers always expected allocationrsc1-24/+15
2009-05-31inode reuse bug.rsc1-1/+1
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.
2009-05-31drop NADDRS and INDIRECT; too many namesrsc1-6/+6
2008-10-20Explain why itrunc() is OK w.r.t. crashes.rtm1-0/+2
2008-10-16free the indirect blockkolya1-0/+1
2008-10-08be clear what the root i-number isrtm1-1/+1
2007-08-28final nitsrsc1-3/+3
2007-08-28spaces around else for rtmrsc1-2/+1
2007-08-28more consistent spacingrsc1-18/+18
2007-08-28Change dev read/write functionsrsc1-2/+2
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.
2007-08-28nitrsc1-3/+3
2007-08-28No one is going to find this inode.rsc1-1/+1
There is only one ref to it -- the caller -- and no links to it.
2007-08-27delete unnecessary #include linesrsc1-3/+2
2007-08-27nitsrsc1-29/+23
2007-08-27tell what an inode isrsc1-4/+9
2007-08-27FS cleanup.rsc1-46/+52
Add utility routines bzero, readsb so that balloc, bfree fit on one page. Make balloc loop clearer.
2007-08-24shuffle for formattingrsc1-12/+18
2007-08-24first ever correct use of strncpyrsc1-22/+2
2007-08-24Remove struct uinode.rsc1-52/+42
Remove type arg to mknod (assume T_DEV).
2007-08-24nitsrsc1-1/+1
2007-08-24simplify ide queuingrtm1-9/+11
nits in comments
2007-08-24add missing iput() at end of _namei()rtm1-4/+6
2007-08-22tweaksrsc1-22/+18
2007-08-22PDF at http://am.lcs.mit.edu/~rsc/xv6.pdfrsc1-291/+120
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
2007-08-21remove namelen parameterrsc1-65/+81
2007-08-21Various cleanup:rsc1-105/+148
- 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].
2007-08-20checkpoint - simpler namei interfacersc1-84/+86
2007-08-20shuffle fs.c in bottom-up orderrsc1-315/+313
2007-08-10various cleanupsrsc1-55/+42
2007-08-10Make cp a magic symbol.rsc1-6/+5
2007-08-09The final curproc[cpu()] is now cprsc1-4/+3
2007-08-09Clearer nameirsc1-69/+106
2007-08-08move ialloc body up, avoiding double check for end of looprsc1-11/+7
2007-08-08panic like bgetrsc1-1/+1
2007-08-08iincref returns new refrsc1-5/+5
2007-08-08fix . .. unlink bugrsc1-0/+6
2006-09-08some comment changeskaashoek1-1/+1