Link Search Menu Expand Document

Due by 11:59 PM on Sunday, Nov 22

Changelog

  • November 21, 2020: Part II release
  • November 21, 2020: Add clarifications about layout
  • November 08, 2020: Initial version

Part I - Read-only FUSE filesystem driver

In Part I of the project, you will begin to develop your filesystem driver to access files stored on a filesystem image. In this part of the assignment, you will be building a limited version of the driver which only supports a few basic operations for reading files on an image.

Installing FUSE

Before you begin, you will need to install a few dependencies in your VM that will be needed for developing your filesystem driver. Specifically, you will need the FUSE libraries (and development versions thereof). You can install these prerequisites by running the following commands as root:

apt-get update
apt-get install fuse libfuse2 libfuse-dev

Building your FUSE driver

For this portion of the project, you are only required to build a driver that can read files stored on a filesystem image. You are not required to implement any write support in Part I of the assignment. A basic read-only filesystem driver in FUSE has only a few functions that must be implemented for the driver to function. Specifically, you will need to implement the following functions of the fuse_operations structure in your filesystem: getattr, readdir, open, read. It is highly suggested that you look to the examples linked to in the resources (the “hello_ll” example should be of help to show the basics of how things work, for instance). You may find it useful to implement support for additional FUSE functions in your read-only driver — the ones listed above are only the absolute minimum.

Your filesystem driver should accept two arguments. The first argument will be the name of the image file to read from and the second argument will be the mount point to mount the filesystem at. Your filesystem driver program must be named “memefs”. You must provide a Makefile with which your driver can be built. You may write your filesystem driver in C or C++, as you see fit, however you may not require any additional external libraries to build/use your driver beyond FUSE, its dependencies, and the standard C or C++ library (as appropriate).

Make sure when submitting your code for Part I of the project that you use the new repository called “yourGitHubUsername-project4” for your code. Please remember to provide your source code files; a Makefile with which we can build your FUSE driver; and a README describing your approach to this portion of the assignment, any references you used outside of the ones provided on this assignment, and any other information you would like the TA grading your assignment to know about. Please also use the git tag functionality to tag your final submission for Part I with a tag called “part1” and ensure that this tag is pushed appropriately to the GitHub copy of your repository. This tag does not have to contain any extra credit code (so do not update it if you submit the extra credit later). Your driver code and Makefile must be placed into a directory called driver inside your repository and your README must be in the root directory of the repository.

You will be using one repository for this project. You should make sure to separate your submissions through tags

Extra Credit - Read-only kernel driver

For extra credit (up to 10%), you may also choose to provide an in-kernel version of your read-only filesystem driver as a loadable kernel module. Keep in mind that when building code for the kernel, you are a lot more limited in what you can do and what functions you have available (remember, the kernel does not allow C++ code, for instance). The kernel module you build must be able to be built on the 5.5.0 version of the kernel.

Refer to the “Notes on Extra Credit” section for some general notes about extra credit on this assignment.

If you wish to implement the extra credit for this assignment, please make a kernel directory in your project4 repository and put your kernel module source code in it and a Makefile with which to build the kernel module. You must also inform the TA that you have attempted the extra credit by mentioning this in your README file.

As this is extra credit on the assignment, you should expect the in-kernel driver to require a significant amount of effort. The TAs (and instructors) will offer no help on the extra credit portions of this assignment — you are on your own to figure it out. Please do not ask any questions specifically about the extra credit on Piazza, Discord, or by E-Mail.

You may work on the extra credit for Part I up until the final due date for Part II of the assignment. The TAs will not be checking for it until that time.