CSCI 333

Storage Systems

Home | Schedule | Labs | Williams CS | Piazza

Lab 3: FUSE FS, part I

Assigned Thursday, 03/05
Due Date Friday 03/20 at 11:59pm

Objectives

You have become (relatively) familiar with FUSE though your barebones "Hello FUSE" implementation. So far you have successfully created a minimal file system that contains a single pseudo-file. Now we will extend our FS behavior to support the creation, deletion, and modification of files and directories. Through this lab, we will explore the challenges of managing persistent data in a file system.

.

Overview

Developing a working file system is very hard. For that reason, this assignment is divided into two parts. In part I (this part), you will develop a lot of scaffolding and enough code for your filesystem to do something testable. In part II (the next part), you will complete the filesystem.

The Assignment

Your assignment is to develop a "Simple FS"-like filesystem that supports the following features by the end of part I:

Why this particular set of features? It's the minimum set of necessary operations to have a filesystem where you can do something visible: create and list directories. You'll find that you need to create quite a bit of scaffolding to get that far (in particular, the code that creates an initialized "Simple FS" filesystem from scratch).

Simple FS Design

When I refer to a "Simple FS"-like filesystem, I mean the following:

For reference, my minimal implementation used a block size of 512 bytes. To make it easy to store the superblock in a filesystem block, I used the following union:

        union {
            struct simple_superblock s;
            char		pad[512];
        }  superblock;

(Note that the superblock should be only 512 bytes, even if you use a different block size for your filesystem. That design makes it possible to read the superblock without knowing the block size, which is a useful feature. If the filesystem uses blocks larger than 512 bytes, the remaining space in the larger "block" is simply wasted.)

I also found it useful to create a few macros to do things like seeking to a particular block, converting back and forth between byte offsets and block numbers, checking/setting a bitmap bit, etc.

Important Notes

Note: You are supposed to be writing a real filesystem. The only differences from a true implementation of a "Simple FS" should be:

To mimic a real filesystem, your implementation must satisfy the following criteria:

Submission

Submit your code (it should be inside a single file named simplefs.c) to your git repository. If you implement any additional features, describe them prominently in your README.md file so that you receive credit.

I would like everyone to use a "new" feature when submitting part 3a: git tags. A "tag" is essentially a label for a specific commit. You can create a tag from the command line (git manual on tags).

When you have completed your Lab 3a, please do two things:

  1. Create a tag named "v3a" (this does not follow the semantic versioning spec...)
  2. Send an email to let me know that you have finished.

Since you will continue to work on code in the same repository for part 3b, the tag will make sure that I test and give feedback on the correct version of your lab.


This lab borrows heavily in from an assignment created by Geoff Kuenning.