psankar/simplefs logo

psankar/simplefs

Free

A simple, kernel-space, on-disk filesystem from the scratch

FreeFree tier
Type
Open Source

About psankar/simplefs

A simple, kernel-space, on-disk filesystem designed from scratch for educational purposes. It provides basic file and directory creation (via .create and .mkdir), supports nested directories, and implements read and write operations (write only works when overwriting the entire block). The codebase is intentionally minimal and straightforward to serve as a teaching tool for understanding Linux kernel filesystem internals. It is not intended for production use and acknowledges limitations such as lack of advanced write support, potential memory leaks, and simplistic locking.

Key Features

Simple, kernel-space, on-disk filesystem implementation from scratch
Supports file creation (.create) and directory creation (.mkdir)
Nested directories are supported
Basic read and write support (write only works when overwriting entire block)
Designed for teaching and learning Linux filesystem concepts
Code is minimal and intentionally simple
Licensed under Creative Commons Zero (public domain)

Pros & Cons

Pros
  • Intentionally simple and minimal codebase, ideal for learning
  • Open source with permissive Creative Commons Zero license
  • Step-by-step understanding possible by examining commit history
  • Good documentation of architecture and known limitations
Cons
  • File cannot grow beyond one block (returns ENOSPC)
  • Write support is basic: only works when overwriting the entire block, not at offsets
  • Locks are not well thought-out and require further analysis
  • Potential memory leaks (acknowledged by author)
  • Not suitable for production use
  • Limited number of filesystem objects supported

Best For

Learning Linux kernel module and filesystem developmentTeaching filesystem architecture and on-disk data structuresUnderstanding the basics of superblocks, inodes, and block allocationReference for building simple educational filesystems

FAQ

What is the purpose of simplefs?
It is a teaching filesystem aimed at helping developers understand how to implement a kernel-space, on-disk filesystem from scratch. It is not intended for production use.
What filesystem operations are supported?
File creation (.create), directory creation (.mkdir), nested directories, basic read, and write (only when overwriting the entire block).
What is the license?
The source code is licensed under Creative Commons Zero (CC0), effectively public domain.
Can I use simplefs on a real system?
No, it is a work in progress with known limitations (e.g., single-block files, missing offset writes, potential memory leaks) and is designed only for learning.