Initial state inode bitmap 10000000 inodes [d a:0 r:2] [] [] [] [] [] [] [] data bitmap 10000000 data [(.,0) (..,0)] [] [] [] [] [] [] [] creat("/f"); inode bitmap 11000000 inodes [d a:0 r:2] [f a:-1 r:1] [] [] [] [] [] [] data bitmap 10000000 data [(.,0) (..,0) (f,1)] [] [] [] [] [] [] [] creat("/o"); inode bitmap 11100000 inodes [d a:0 r:2] [f a:-1 r:1] [f a:-1 r:1] [] [] [] [] [] data bitmap 10000000 data [(.,0) (..,0) (f,1) (o,2)] [] [] [] [] [] [] [] link("/f", "/v"); inode bitmap 11100000 inodes [d a:0 r:2] [f a:-1 r:2] [f a:-1 r:1] [] [] [] [] [] data bitmap 10000000 data [(.,0) (..,0) (f,1) (o,2) (v,1)] [] [] [] [] [] [] [] mkdir("/p"); inode bitmap 11110000 inodes [d a:0 r:3] [f a:-1 r:2] [f a:-1 r:1] [d a:1 r:2] [] [] [] [] data bitmap 11000000 data [(.,0) (..,0) (f,1) (o,2) (v,1) (p,3)] [(.,3) (..,0)] [] [] [] [] [] [] fd=open("/o", O_WRONLY|O_APPEND); write(fd, "l", BLOCKSIZE); close(fd); inode bitmap 11110000 inodes [d a:0 r:3] [f a:-1 r:2] [f a:2 r:1] [d a:1 r:2] [] [] [] [] data bitmap 11100000 data [(.,0) (..,0) (f,1) (o,2) (v,1) (p,3)] [(.,3) (..,0)] [l] [] [] [] [] [] link("/o", "/p/s"); inode bitmap 11110000 inodes [d a:0 r:3] [f a:-1 r:2] [f a:2 r:2] [d a:1 r:2] [] [] [] [] data bitmap 11100000 data [(.,0) (..,0) (f,1) (o,2) (v,1) (p,3)] [(.,3) (..,0) (s,2)] [l] [] [] [] [] []
Initial state inode bitmap 10000000 inodes [d a:0 r:2] [] [] [] [] [] [] [] data bitmap 10000000 data [(.,0) (..,0)] [] [] [] [] [] [] [] 1. creat("/f"); state: inode bitmap: inodes: data bitmap: data: 2. creat("/o"); state: inode bitmap: inodes: data bitmap: data: 3. link("/f", "/v"); state: inode bitmap: inodes: data bitmap: data: 4. mkdir("/p"); state: inode bitmap: inodes: data bitmap: data: 5. fd=open("/o", O_WRONLY|O_APPEND); write(fd, "l", BLOCKSIZE); close(fd); state: inode bitmap: inodes: data bitmap: data: 6. link("/o", "/p/s"); state: inode bitmap: inodes: data bitmap: data: