diff options
author | rtm <rtm> | 2006-08-13 12:22:44 +0000 |
---|---|---|
committer | rtm <rtm> | 2006-08-13 12:22:44 +0000 |
commit | 211ff0c67ea6737853cf932313cf4e27cc15f55c (patch) | |
tree | e28f2e9f39ddc226203c16e955337216bbdab7f5 /Notes | |
parent | c372e8dc348e4bb30aae7642db92ecbeedbc83ab (diff) | |
download | xv6-labs-211ff0c67ea6737853cf932313cf4e27cc15f55c.tar.gz xv6-labs-211ff0c67ea6737853cf932313cf4e27cc15f55c.tar.bz2 xv6-labs-211ff0c67ea6737853cf932313cf4e27cc15f55c.zip |
namei returns locked parent dir inode for create / unlink
don't hold fd table lock across idecref() (latter does block i/o)
idecref calls iput() in case last ref -> freeing inode
dir size is 512 * # blocks, so readi/writei &c work
unlink deletes dirent even if ip->nlink > 0
Diffstat (limited to 'Notes')
-rw-r--r-- | Notes | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -365,3 +365,18 @@ two bugs in unlink: don't just return if nlink > 0, and search for name, not inum is there a create/create race for same file name? resulting in two entries w/ same name in directory? + +namei + return just inode + return offset in dir where found, w/ dir locked, for unlink + return dir locked, for mknod + +is the offset alone useful? how do I read/write it? + +test: one process unlinks a file while another links to it +test: simultaneous create of same file +test: one process opens a file while another deletes it + +oy, mkfs wants dir size to be last written entry, but i + want it to be nblocks*512 + maybe fix kernel code to handle former |