Commit graph

122 commits

Author SHA1 Message Date
Robert Morris
4638cabf8c fix runoff complaints about pagination and long lines 2017-08-29 14:11:59 -04:00
Robert Morris
6389d9d410 nothing much 2017-08-09 14:16:55 -04:00
Robert Morris
70705966ad comment fixes 2017-08-09 06:54:45 -04:00
Robert Morris
a4ee6f7de3 fix iput() to more obviously avoid deadlock 2017-08-08 14:19:54 -04:00
Robert Morris
1c7aa96005 a little more lock documentation 2017-08-08 14:12:25 -04:00
Robert Morris
70d912b332 protect ip->valid and ip->nlink with sleep lock in iput() 2017-08-08 13:48:48 -04:00
Robert Morris
3375df5061 change ip->flags&I_VALID to ip->valid 2017-08-08 13:34:13 -04:00
Robert Morris
14270288b7 Merge branch 'master' of g.csail.mit.edu:xv6-dev 2017-08-08 13:27:06 -04:00
Robert Morris
aba8423c4a frans' fixes to iput() 2017-08-08 13:26:57 -04:00
Robert Morris
9cec455b17 fs comment nits 2017-08-08 13:24:38 -04:00
Frans Kaashoek
825ce074b1 Remove some debugging statements 2017-08-07 15:15:18 -04:00
Frans Kaashoek
61cb32aa9b Merge branch 'nogs' 2017-08-07 14:35:05 -04:00
Grant Wu
61f26e3c97 Fix typo in dirlookup 2017-04-26 19:56:51 -07:00
Frans Kaashoek
abf847a083 Start of an experiment to remove the use of gs for cpu local variables. 2017-01-31 17:47:16 -05:00
Frans Kaashoek
dec637bc59 Replace I_BUSY with sleep locks 2016-09-11 20:59:57 -04:00
Frans Kaashoek
6670d3b5e0 Straight replacement of B_BUSY with a sleeping lock. 2016-09-11 17:24:04 -04:00
Frans Kaashoek
b7fed77b7b Fix a few lines that runoff is complaining about that they are too long 2016-09-02 14:59:00 -04:00
Frans Kaashoek
7894fcd217 Remove trailing white space with:
for f in *.{h,c}; do sed -i .sed 's/[[:blank:]]*$//' $f; done
(Thanks to Nicolás Wolovick)
2016-08-25 09:13:00 -04:00
Frans Kaashoek
8320d61be5 Pick up where i left off in april:
- 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.
2015-06-27 12:39:13 -04:00
Frans Kaashoek
c24ac5d763 Disentangle block size from the disk's sector size. Set block size to 1024 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.
2015-04-03 08:22:02 -04:00
Robert Morris
e2b4583d05 xx 2014-08-28 17:04:47 -04:00
Robert Morris
12eeefc72d comments 2014-08-27 14:14:52 -04:00
Robert Morris
2c56547272 every iput() and namei() must be inside a transaction 2014-08-04 13:06:48 -04:00
Robert Morris
38eee5bca7 more FS comment clarification 2011-10-11 10:11:53 -04:00
Robert Morris
a5fbfe418a clarify some FS comments 2011-10-11 06:41:37 -04:00
Frans Kaashoek
1ddfbbb194 Revert "Introduce and use sleeplocks instead of BUSY flags"
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
2011-08-29 17:18:40 -04:00
Frans Kaashoek
3a5fa7ed90 Introduce and use sleeplocks instead of BUSY flags
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-26 10:08:29 -04:00
Robert Morris
327cc21fba make dirlookup and dirlink more similar 2011-08-19 13:30:57 -04:00
Robert Morris
5053dd6a6d avoid deadlock by calling begin_trans() before locking any inodes 2011-08-15 12:44:20 -04:00
Robert Morris
2e59046362 log write() data
usertest for big write()s
push begin_trans/commit_trans down into syscalls
2011-08-12 09:25:39 -04:00
Frans Kaashoek
13a96baefc Dirt simple logging
Passes usertests and stressfs
Seems to recover correctly in a number of simple cases
2011-07-27 20:35:46 -04:00
Nickolai Zeldovich
96b7da5f03 do not run past the end of the disk!
[ cherry-picked de6075ff0978108daea1d658425bcb37663a98a0 ]

Conflicts:

	fs.c
2011-06-24 05:26:57 -04:00
Austin Clements
745e73cd3d Comment typo 2009-10-24 21:31:01 -04:00
Russ Cox
48755214c9 assorted fixes:
* rename c/cp to cpu/proc
 * rename cpu.context to cpu.scheduler
 * fix some comments
 * formatting for printout
2009-08-30 23:02:08 -07:00
Russ Cox
0aef891495 shuffle and tweak for formatting.
pdf has very good page breaks now.
would be a good copy for fall 2009.
2009-08-08 01:07:30 -07:00
Russ Cox
f9a06440ab rearrangements and cleanup for text 2009-07-11 19:26:01 -07:00
rsc
34295f461a group locks into structs they protect.
few naming nits.
2009-05-31 05:12:21 +00:00
rsc
ce72cadbe0 fix bug fix 2009-05-31 01:53:08 +00:00
rsc
13ae8808c4 tidy fs.c; bmap callers always expected allocation 2009-05-31 01:44:20 +00:00
rsc
f12551b599 inode reuse bug.
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-31 01:34:46 +00:00
rsc
ba6cd8a685 drop NADDRS and INDIRECT; too many names 2009-05-31 00:59:37 +00:00
rtm
8eb20827c2 Explain why itrunc() is OK w.r.t. crashes. 2008-10-20 18:05:48 +00:00
kolya
e1626709d6 free the indirect block 2008-10-16 15:00:23 +00:00
rtm
2ce40d7088 be clear what the root i-number is 2008-10-08 18:57:13 +00:00
rsc
bf2932a686 final nits 2007-08-28 19:39:49 +00:00
rsc
5516be1fed spaces around else for rtm 2007-08-28 18:37:41 +00:00
rsc
e4d6a21165 more consistent spacing 2007-08-28 18:32:08 +00:00
rsc
d844f0f9d9 Change dev read/write functions
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-28 17:49:49 +00:00
rsc
3341e30f6e nit 2007-08-28 04:13:24 +00:00
rsc
8970df0c1b No one is going to find this inode.
There is only one ref to it -- the caller --
and no links to it.
2007-08-28 03:31:11 +00:00