CSCI 333
Storage Systems
Home | Schedule | Labs | Williams CS | Piazza
Lab 3b: FUSE FS, part II
Due Date |
Target: Sunday 05/10 Final: Tuesday 05/19 (end of reading period) |
---|
Objectives
In lab 3b, you will (1) finish the prototype filesystem you began in lab 3a, and (2) add enough functionality to your prototype filesystem that it can be used to store actual data in mutable files.
The Assignment
Your assignment is to finish the "Simple FS"-like filesystem that you began in lab 3a. 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, so you can assume mode
will always be S_IFREG
and ignore dev
),
open
,
read
,
rmdir
,
statfs
,
truncate
,
unlink
, and
write
.
readlink
,
symlink
,
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:
statfs
operation should correctly report the
amount of free space in the data region of 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.
Testing your File System
Many of your features can be tested using standard Unix utilities
(the dd
utility is especially
useful—see `man dd`
).
I strongly recommend that you write special test code or scripts.
I will provide some tests, but I also encourage you to share any tests
that you write with the group.
So as soon as you add functionality, create a unit test.
Then run all of your existing unit tests to verify your new "feature"
didn't break anything!
I recommend creating a separate folder of test scripts.
Here are some things that I expect to work, so you are encouraged to create at least tests for these features:
ls -la
, including for files of
various sizes, and including .
and ..
`echo xxx >> foo`
)
truncate
to extend files by adding zeros
dd
with the conv=notrunc
switch is
one way to do this)
statfs
(hint: the df
command uses that call)
The above is not an exhaustive list. Try to think of any useful functionality that has been omitted.
Important Notes
Refer back to the important notes in lab 3a to make sure you don't do anything silly. In addition:
Submission
Commit your code to your git repository.
Your repository's README.md
file should describe how to compile and run it.
If you implement any additional features,
describe them prominently in your README.md
file so that you
receive credit.
So that I know that you have finished, please use the commit message
"lab 3b submission" when you commit your final version.
If you later realize that you were not done, you can continue
to make additional commits, but it should be clear from the output of
`git log`
which version of your code is your submission.
Ideally, the final version of your lab will be completed by Sunday, May 10. That gives one week before the start of the final exam period. I realize that this has been a "non-traditional" semester in almost every imaginable way, and it may have been an uphill battle to stay ahead, stay focused, and communicate. If you find yourself lost or falling behind your target schedule, I would like you to consider the following options:
Hints and Help
I have shared a framework to help with part I. I will continue to post updates and tests to that repository. When I do, I will post an update on Piazza so that you are aware.
If there is anything about the repository's code that is unclear, please let me know. My goal is to get us all across the finish line and learn something in the process. So you can borrow as much or as little of that code as you'd like and use it in your own implementations. The only requirement is that you understand and can explain to me all of the code that you submit.
This lab borrows from an assignment created by Geoff Kuenning.