The purpose of this assignment is to finish the filesystem you began in Homework 2. At the end of this assignment, you should have a working filesystem that can be used to store actual files.
You may write in any language that is supported on Wilkes and that supports Fuse, but as mentioned in class, I strongly recommend C or C++. Your code will be tested on Wilkes and must compile and run there.
Your assignment is to finish the FAT-like filesystem that you began in Homework 2. Your finished filesystem should have the following features:
mkdir), you must support the following additional operations:
mknod(only for plain files),
utimens. Note that many of these operations require additional filesystem design (e.g.,
chownrequires that you track ownership).
writeoperation must support full Unix semantics: it must be possible to extend a file by writing at the end, to rewrite arbitrary bytes in the middle of a file, and to extend a file by a large amount by seeking far past the end and writing a single byte.
statfsoperation should correctly report the amount of free space in the file system. In particular, if it says that n blocks are left, it should be possible to write n additional blocks of data to an existing file, and impossible to write n+1 blocks.
Many of your features can be tested using standard Unix utilities
man dd—is especially useful).
However, you may wish to
write special test code or scripts.
Some things that I expect to work:
ls -la, including for symlinks and files of various sizes, and including
echo xxx >> foo")
truncateto extend files by adding zeros
conv=notruncswitch is one way to do this)
dfcommand uses that call)
The above is not an exhaustive list. Try to think of what I've (deliberately) omitted.
Refer back to the important notes in part 1 of this assignment to make sure you don't do anything silly. In addition:
Submit your code (it should be a single file) as assignment 3 with
cs137submit. If you implement any extra features,
please describe them prominently in comments at the top of the file.
© 2018, Geoff Kuenning
This page is maintained by Geoff Kuenning.