My project partner and I are required to implement a file system for a Flash device using FUSE. Until now, our implementation of the Inode File has been the following:
- Read the Inode file from the Flash device.
- Store it in memory until the file system is unmounted.
- Periodically write the Inode File back to Flash (in a log-like strictly append-only manner)
- Write the Inode file back to the flash (just as int the above step)
The structure of the Inode, when in memory, is a mapping of a C struct INode to the starting offset on the Flash (in terms of the sector count). struct INode is the same as the POSIX Inode struct, with a few entries removed.
Just like any other buffer, this IFile (mapping of Inodes to offsets) would be written to flash periodically or prior to unmounting. This implementation works, however, we are not sure if this is the right or the best way to do it.
So, is there a better, simpler, more appropriate way to implement the Inode File?