A fully functional Unix-like file system implemented from scratch in user space using FUSE (Filesystem in Userspace).
This project demonstrates deep understanding of operating systems, file system design, and low-level systems programming.
Built as part of an advanced OS curriculum, but engineered to production-quality standards.
This filesystem implements real OS concepts that production systems rely on:
- Inodes and directory entries
- Block allocation with bitmaps
- Path traversal and name resolution
- File metadata (permissions, ownership, timestamps)
- Correct POSIX error handling
- Read/write consistency through disk-backed storage
- Integration with the Linux VFS layer via FUSE
You can mount this filesystem and use it like ext4:
ls
cat
mkdir
touch
mv
rmLinux VFS
↓
FUSE Kernel Module
↓
User-Space FUSE Driver (fs5600)
↓
Disk Image File (test.img)
The filesystem runs as a user-space process, while Linux transparently forwards file operations to it through FUSE.
Each disk is divided into 4KB blocks:
| Block | Purpose |
|---|---|
| 0 | Superblock |
| 1 | Block bitmap |
| 2 | Root directory inode |
| 3+ | Inodes and data blocks |
- Block size: 4096 bytes
- Inode size: 1 block (4096 bytes)
- Max filesystem size: 128MB
- Directories: Fixed-size (128 entries)
- No hard/soft links (intentional simplification)
stat,getattrreaddir- Permission bits (
chmod) - Ownership (uid / gid)
- POSIX timestamps (ctime, mtime)
- Create / delete files
- Read & write arbitrary byte ranges
- Rename within directory
- Truncate files
- Persistent storage backed by disk image
- Create & remove directories
- Enforce empty-directory deletion rules
- Name validation & path resolution
Fully POSIX-compliant error codes:
ENOENT,ENOTDIR,EISDIREINVAL,ENOMEM,EIO,ENOTEMPTY
- C (low-level systems programming)
- Linux FUSE
- POSIX filesystem semantics
- Bitmap-based block allocation
- Unit testing (Check framework)
make
mkdir fs
./lab5fuse -image test.img fs
cd fs
mkdir demo
echo "hello world" > demo/file.txt
cat demo/file.txt
fusermount -u fsThe filesystem behaves exactly like a native Linux filesystem.
39+ unit tests covering:
- Path resolution
- Metadata correctness
- File and directory semantics
- Error handling edge cases
- Deterministic disk images for reproducibility
- Verified against reference filesystem behavior