Experiment with writing a simple, kernel-space, on-disk filesystem.
Author: HUST 2015 IS03 ChenWei
A filesystem driver for linux.
Compile
Install linux kernel sources (Linux 4.14) and run make from the checkedout directory.
Test
$ make
$ dd bs=4096 count=100 if=/dev/zero of=image
$ ./mkfs ./image
$ sudo insmod HUST_fs.ko
$ sudo mount -o loop -t HUST_fs image ./test
$ sudo chmod 0777 ./test -R
$ cd test
$ cat file
$ echo "Hello World!" > file
$ cat file
Dummy block | Super block | bmap | imap |inode table | data block0 | data block1 | ... ...
You will see it clearly on mkfs.c