A simple filesystem to understand things.

This is a Work In Progress. Do not use this yet.

The source files are licensed under Creative Commons Zero License.
More information at:	http://creativecommons.org/publicdomain/zero/1.0/
Full license text at:	http://creativecommons.org/publicdomain/zero/1.0/legalcode

To compile:
------------
install linux kernel sources and run make from the checkedout directory.

To test:
---------


~/src/simplefs> make
~/src/simplefs> dd bs=4096 count=100 if=/dev/zero of=image
100+0 records in
100+0 records out
409600 bytes (410 kB) copied, 0.00175839 s, 233 MB/s
~/src/simplefs> ./mkfs-simplefs image
Super block written succesfully
root directory inode written succesfully
welcomefile inode written succesfully
inode store padding bytes (after the two inodes) written sucessfully
root directory datablocks (name+inode_no pair for welcomefile) written succesfully
padding after the rootdirectory children written succesfully
welcomefilebody has been written succesfully
~/src/simplefs>


linux-okb0:/home/psankar/src/simplefs # insmod simplefs.ko;mount -o loop -t simplefs image /home/psankar/src/simplefs/mount/;dmesg
[ 8717.049630] Sucessfully registered simplefs
[ 8717.056140] The magic number obtained in disk is: [268640275]
[ 8717.056147] simplefs filesystem of version [1] formatted with a block size of [4096] detected in the device.
[ 8717.056183] simplefs is succesfully mounted on [/dev/loop4]
linux-okb0:/home/psankar/src/simplefs # cd mount
linux-okb0:/home/psankar/src/simplefs/mount # ls
vanakkam
linux-okb0:/home/psankar/src/simplefs/mount # ls -lh
total 0
---------- 1 root root 0 Apr 23 14:25 vanakkam
linux-okb0:/home/psankar/src/simplefs/mount # cd ..
linux-okb0:/home/psankar/src/simplefs # umount mount
linux-okb0:/home/psankar/src/simplefs # rmmod simplefs.ko
linux-okb0:/home/psankar/src/simplefs # dmesg -c
[ 8717.049630] Sucessfully registered simplefs
[ 8717.056140] The magic number obtained in disk is: [268640275]
[ 8717.056147] simplefs filesystem of version [1] formatted with a block size of [4096] detected in the device.
[ 8717.056183] simplefs is succesfully mounted on [/dev/loop4]
[ 8735.146533] simplefs superblock is destroyed. Unmount succesful.
[ 8740.101526] Sucessfully unregistered simplefs
linux-okb0:/home/psankar/src/simplefs #
Description
A simple, kernel-space, on-disk filesystem from the scratch
Readme 158 KiB
Languages
C 92.7%
Shell 6.5%
Makefile 0.8%