mirror of
https://github.com/psankar/simplefs.git
synced 2025-07-24 22:44:45 +02:00
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: --------- One-time-activity: linux-okb0:/home/psankar/src/simplefs > dd bs=1M count=100 if=/dev/zero of=image linux-okb0:/home/psankar/src/simplefs > mkdir mount Repeat everytime after making changes to the source: linux-okb0:/home/psankar/src/simplefs > make linux-okb0:/home/psankar/src/simplefs > su - ; # switch to root user if not already, or use sudo linux-okb0:/home/psankar/src/simplefs # dmesg -c linux-okb0:/home/psankar/src/simplefs # insmod simplefs.ko ; mount -o loop -t simplefs image /home/psankar/src/simplefs/mount/ ; dmesg [ 5788.269663] Sucessfully registered simplefs [ 5788.274803] simplefs is succesfully mounted on [/dev/loop2] linux-okb0:/home/psankar/src/simplefs # cd mount/ linux-okb0:/home/psankar/src/simplefs/mount # ls linux-okb0:/home/psankar/src/simplefs/mount # cd .. linux-okb0:/home/psankar/src/simplefs # umount mount ; rmmod simplefs.ko linux-okb0:/home/psankar/src/simplefs # dmesg [ 5788.269663] Sucessfully registered simplefs [ 5788.274803] simplefs is succesfully mounted on [/dev/loop2] [ 5814.008604] simplefs superblock is destroyed. Unmount succesful. [ 5814.014065] Sucessfully unregistered simplefs linux-okb0:/home/psankar/src/simplefs #
Description
Languages
C
92.7%
Shell
6.5%
Makefile
0.8%