From 4032ad3c094b17fcf7bbbc8fd3df087f098ccf06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sankar=20=E0=AE=9A=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B0?= =?UTF-8?q?=E0=AF=8D?= Date: Sun, 28 Jul 2013 22:37:37 +0530 Subject: [PATCH] Update README with architecture notes --- README | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/README b/README index fb65f2f..a1265e5 100644 --- a/README +++ b/README @@ -6,14 +6,54 @@ 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 +Architecture + Notes +-------------------- + +Block Zero = Super block +Block One = Inode store +Block Two = Occupied by the initial file that is created as part of the mkfs. + +Only a limited number of filesystem objects are supported. +A file cannot grow beyond one block. ENOSPC will be returned as an error on attempting to do. +Directories store the children inode number and name in their data blocks. +Read support is implemented. +Files and Directories can be created. Support for .create and .mkdir is implemented. +Basic write support is implemented. Writes may not succeed if done in an offset. Works when you overwrite the entire block. +Locks are not well thought-out. The current locking scheme works but needs more analysis + code reviews. +Memory leaks may (will ?) exist. + + +Credits +-------- +All the source code is written by me (Sankar P) until this point. + +An O_LARGETHANKS to the guidance of VijaiBabu M and Santosh Venugopal. Their excellent talks on filesystems motivated me to implement a file system from the scratch. Without their inspirational speeches, I would not have focussed on filesystems. + +A big thanks should go to the kernelnewbies mailing list for helping me with clarifying the nitty-gritties of the linux kernel, especially people like Mulyadi Santosa, Valdis Kletnieks, Manish Katiyar, Rajat Sharma etc. + + +TODO +----- +- Check the locks. Remove/Add as necessary. +- Send for review +- Make a 1.0 release +- After the 1.0 release, start with support for extents, which on completion will be 2.0 +- After the 2.0 release, start with journalling support, which on completion will be 3.0 + + +How To ? +-------- +If you are planning to learn filesystems, start from the scratch. You can look from the first commit in this repository and move the way up. + + To compile: ------------ install linux kernel sources and run make from the checkedout directory. + To test: --------- - psankar@linux-9dni:~/src/simplefs> make psankar@linux-9dni:~/src/simplefs> dd bs=4096 count=100 if=/dev/zero of=image