It has been implemented as based on Unix File System in C++.
The sample run of the program will be like -> makeFileSystem 4 400 mySystem.dat
where 4 is the block size of the file system in KB for both data blocks and i-node blocks, and 400 is the number of free i-nodes for an empty file system. mySystem.dat is the Linux file that contains all the file system. When you work on the file system, this file contains all the information for the file system. The size of mySystem.dat will be exactly 1 MB all the time whether it contains any information or not.
And program that performs file system operation on the file system.
You can observe all system operation -> Commands usage
There are 5 main structures in the above file system. It is placed in 1mb file system in order from left to right. Superblock holds metadata about all file system. Bitmaps connects inodes and blocks to apply operations.It holds emptiness or fullness information specific inodes or blocks.(1 or 0).
The Inode describes a file system object such as file,directory,links etc. Each inode stores the metadata(last modification,name,size etc.) about objects,block locations.
It has been placed unused part between Inode and blocks. Because the start of the superblock and the end of the file system should be at a modularly easy computable value. It has been calculated size that cannot be created as block.
Unused part = 1 mb - sizeof(Superblock + Bitmaps + Inodes + blocks)
To Superblock, It has been calculated number of blocks as block size and remaining from other informations(superblock,bitmaps,inode).
code
required to get starteddel : Deletes file from the path.
list: ./fileSystemOper fileSystem.data list [path-Folder]
mkdir: ./fileSystemOper fileSystem.data mkdir [path-Folder]
rmdir: ./fileSystemOper fileSystem.data rmdir [path-Folder]
dumpe2fs:./fileSystemOper fileSystem.data dumpe2fs
write: ./fileSystemOper fileSystem.data write [path-File] [linuxFile]
read: ./fileSystemOper fileSystem.data read [path-File] [linuxFile]
del: ./fileSystemOper fileSystem.data del [path-File]
Reach out to me at one of the following places!
Emre_Ozgun_linkedin
Emre_Ozgun_stackoverflow