Note: Clone and start studying the starter code as soon as possible. This assignment will likely require more programming effort than previous assignments.

A File System

In this assignment you will build a FUSE filesystem driver that will let you mount a 1MB disk image (data file) as a filesystem.

We also provide an ungraded lab that will lead you through installing FUSE and familiarizing yourself with parts of the starter code.

Step 1: Install FUSE

For this assignment you will need to use your VM. You’ll need to install the following packages:

Running

$ sudo apt-get install libfuse-dev libbsd-dev pkg-config

should do the trick.

After completing this step, go to Pre-submission and submit the repository as requested by 6/17/25 at 10pm.

Step 2: Implement a basic filesystem

You should extend the provided starter code so that it lets you do the following:

You will need to extend the functionality in nufs.c, which only provides a simulated filesystem to begin with. This will require that you come up with a structure for how the file system will store data in it’s 1MB “disk”. See these Filesystem slides and OSTEP, Chapter 40 for inspiration.

We have provided some helper code in the helpers/ directory. You can use it if you want, but you don’t have to. However, blocks.{c,h} and bitmap.{c,h} might save you some time as these implement block manipulation over a binary disk image. Feel free to extend the functionality if needed.

Some additional header files that might be useful are provided in the hints directory. These are just some data definitions and function prototypes to serve as an inspiration for abstraction layers. They are provided “as-is”, meaning you’ll need to make sense of them. Reading up on file system implementation in the OSTEP book might help. If they don’t seem helpful, you are free to implement your own abstractions.

Step 3: Big files

Extend the filesystem to support files larger than 4K. The files must fit into the free blocks on disk. This must include proper allocation and deallocation as the file grows or shrinks. The file system needs to be able to handle the following example situations:

Deliverables

Pre-submission

After doing Step 1, that is, after cloning the repository and installing FUSE,

  1. Execute the command

    $ pkg-config --modversion fuse &> fuse_version
    
  2. Commit the file fuse_version to your repo
  3. Submit your repository to Gradescope under Project 2: Pre-submission by 6/17/25 at 10pm. No late submissions are allowed.

Main submission

Modify the starter code to implement the requested functionality (steps 2 and 3).

Commit the code to your repository. Do not include any executables, .o files, or other binary, temporary, or hidden files (unless they were part of the starter code). Do not include any disk images.

Once you are done, remember to submit your solution to Gradescope and do not forget to include your partner. Submit under Project 2: Main Submission

Provided Makefile and Tests

The provided Makefile should simplify your development cycle. It provides the following targets:

Rubric

The grade is broken down into three categories:


Ben Weintraub © 2025
Site Last Updated June 27, 2025 at 13:20:40 UTC