hi i am working on a project which deals with simulating the unix file system or any other file system .i can invent my own as well.i am developing a unix like shell which will provide all the file handling commands similar to unix.Basically I want to allocate a large file on the actual file system, and treat it as a virtual disk for the file system simulation. In order to implement the file system, I would create and manipulate various data structures on the virtual disk to create and manage the file system. For manipulating the file system's data on the virtual disk, i can use C file functions such as fopen, fread, fwrite etc and implement a unix like shell which will act on this disk. but my problem is how do i store the tree like unix file system in a file(virtual disk) ??or how do i create data structures like superblock, boot block,inode list, within this virtual disk ??is simulating the unix file system tougher ?if yes then what other options should i look for ?
You need to define the data structure in a better way something like virtual disk has superblock, boot block,inode list and they can be accessed using hashing ... Unix is a tough one and you can start of with the DOS like system and then move on to the Unix file system simulation.
but the data structure must be persistant....the only persistant data structure i know of is the file...fore eg. you cant store link list on a hard disk permanently. and btw i have the option of inventing my own file system...can you give some simple idea ??the only requirement is that the file system should be hierarchial,there should be some options for security and basic file management scheme.
But you can have a file system which can contain other files. Say your virtual system can store some config files which cannot be accesed but just for viewing purpose you have API's Simple is start off with having some files into a filesystem file and allow the access based on accesssebility.
yeah i know but the problem is how to implement (which data structure ?) this virtual disk ?? it should have many components(boot block,inode list,files etc) so using a structure would be appropriate but you cant store a struct on your actual file system.It is not persistant like file is. but you have problems with using file as well..