The purpose of this assignment is to finish the filesystem you begain 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, but as mentioned in class, I strongly recommend C or C++.
Your assignment is to finish the FAT-like filesystem that you began in Homework 2. Your finished filesystem should have the following features:
getattr
,
access
,
readdir
, and mkdir
, you must support
the following additional operations:
close
(i.e.,
release
),
create
,
fgetattr
,
mknod
(only for plain files),
open
,
read
,
readlink
,
rmdir
,
statfs
,
symlink
,
truncate
,
unlink
, and
write
.
chmod
,
chown
,
fsync
,
link
,
rename
, or
utimens
. Note that many of these operations
require additional filesystem design (e.g., chown
requires that you track ownership).
write
operation 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.
statfs
operation 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 exactly n more blocks of data to an existing
file.
Many of your features can be tested using standard Unix utilities
(dd
--see man dd
--is especially useful).
However, you may wish to
write special test code or scripts.
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.
© 2014, Geoff Kuenning
This page is maintained by Geoff Kuenning.