• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Whenever you search in PBworks, Dokkio Sidebar (from the makers of PBworks) will run the same search in your Drive, Dropbox, OneDrive, Gmail, and Slack. Now you can find what you're looking for wherever it lives. Try Dokkio Sidebar for free.



Page history last edited by PBworks 14 years, 5 months ago

NGFS ( Documentation )


All the documentation relevant to this project or linux filesystems should be kept here. Even if you wish to put it to other pages make sure you have a link here too.


Useful Links



Structure of NGFS

     This is a brief documentation of how NGFS is organised to assist you when you read the code. The code is pretty much based on ext2 and minix and some parts have been even shamelessly copied (atleast the logic and variable names).

     Currently NGFS works on block size of 4096. It is assumed that the partition size is atleast 10 blocks and no checks have been made internally to ensure that it is of atleast 40960 bytes. The metadata is stored in the first 2 blocks of the filesystem as defined in ngfs.h

     #define NGFS_SUPER_BLOCK 0 /* Where super block resides */

    #define NGFS_INODE_BLOCK 1 /* Block number where inode info is saved  */

    #define NGFS_ROOT_BLOCK 2  /* Where root directory info resides */


   Rest all ie.. atleast 8 blocks are free for data. Root directory information is stored in the 3rd block of the filesystem ( Note that blocks are numbered from 0). First block holds the superblock structure and most of the space is wasted in the first block sincesuperblock is only of 34 bytes in size. Inode information for various inodes will be kept in second block and you can easily get the inode information for an inode by adding an offset of (inode_no * sizeof(inode)) from the start of second block. Inodes 0 and 1 are not used in our case and the root inode is assigned a value of 2. Information of free blocks and inodes in the filesystem is kept as bitmap in two integers in superblock namely block_bmp and inode_bmp. Since we impose the restriction of no file having more than a block size, theoretically we can have 30 files in our filesystem.


Comments (0)

You don't have permission to comment on this page.