diff options
author | kaashoek <kaashoek> | 2006-08-13 05:28:04 +0000 |
---|---|---|
committer | kaashoek <kaashoek> | 2006-08-13 05:28:04 +0000 |
commit | c372e8dc348e4bb30aae7642db92ecbeedbc83ab (patch) | |
tree | 2260179bbbacee1ab83f8a4336c325294ac2867d /userfs.c | |
parent | 9e5970d596d7b1634200d50e96130886f593cede (diff) | |
download | xv6-labs-c372e8dc348e4bb30aae7642db92ecbeedbc83ab.tar.gz xv6-labs-c372e8dc348e4bb30aae7642db92ecbeedbc83ab.tar.bz2 xv6-labs-c372e8dc348e4bb30aae7642db92ecbeedbc83ab.zip |
zero freed blocks
multi-block directories
track size of directory (size = number entries in use)
should namei (and other code that scans through directories) scan through all blocks of a directory and not use size?
Diffstat (limited to 'userfs.c')
-rw-r--r-- | userfs.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -7,6 +7,7 @@ // file system tests char buf[2000]; +char name[3]; char *echo_args[] = { "echo", "hello", "goodbye", 0 }; char *cat_args[] = { "cat", "README", 0 }; @@ -65,6 +66,20 @@ main(void) } close(fd); unlink("doesnotexist"); + name[0] = 'a'; + name[2] = '\0'; + for (i = 0; i < 52; i++) { + name[1] = '0' + i; + fd = open(name, O_CREATE|O_RDWR); + close(fd); + } + name[0] = 'a'; + name[2] = '\0'; + for (i = 0; i < 52; i++) { + name[1] = '0' + i; + unlink(name); + } + //exec("echo", echo_args); printf(stdout, "about to do exec\n"); exec("cat", cat_args); |