Exercises from the book using vsfs.py:
$ python ./vsfs.py -n 4
Initial state
inode bitmap 10000000
inodes [d a:0 r:2] [] [] [] [] [] [] []
data bitmap 10000000
data [(.,0) (..,0)] [] [] [] [] [] [] []
Which operation took place?
inode bitmap 11000000
inodes [d a:0 r:3] [d a:1 r:2] [] [] [] [] [] []
data bitmap 11000000
data [(.,0) (..,0) (g,1)] [(.,1) (..,0)] [] [] [] [] [] []
Which operation took place?
inode bitmap 11100000
inodes [d a:0 r:3] [d a:1 r:2] [f a:-1 r:1] [] [] [] [] []
data bitmap 11000000
data [(.,0) (..,0) (g,1) (q,2)] [(.,1) (..,0)] [] [] [] [] [] []
Which operation took place?
inode bitmap 11110000
inodes [d a:0 r:3] [d a:1 r:2] [f a:-1 r:1] [f a:-1 r:1] [] [] [] []
data bitmap 11000000
data [(.,0) (..,0) (g,1) (q,2) (u,3)] [(.,1) (..,0)] [] [] [] [] [] []
Which operation took place?
inode bitmap 11110000
inodes [d a:0 r:3] [d a:1 r:2] [f a:-1 r:1] [f a:-1 r:2] [] [] [] []
data bitmap 11000000
data [(.,0) (..,0) (g,1) (q,2) (u,3) (x,3)] [(.,1) (..,0)] [] [] [] [] [] []
$ python ./vsfs.py -n 4 -r
Initial state
inode bitmap 10000000
inodes [d a:0 r:2] [] [] [] [] [] [] []
data bitmap 10000000
data [(.,0) (..,0)] [] [] [] [] [] [] []
mkdir("/g"); State of file system (inode bitmap, inodes, data bitmap, data)?
creat("/q");
creat("/u");
link("/u", "/x");