I'm implementing block and inode cache for my virtual file system.
I have some questions:
How can I choose which files I must cache?
How can I handle block and inode cache? With a linked list? Or with a hash table? (In the second case, how can I handle it?)
Can you give me some advices?
Block and inode cache
Well, this is more or less a bump, I haven't gotten to caching yet, I simply load them as required, and dump them when not required. I plan on re-writing parts of my code later on to include some cacheing and change around the order that things are performed (for example, I have ONE generic search for file in directory function, so the list must be populated with all entries on entry to the directory, and can be dumped when the directory is exited), I am going to re-implement this so you can search a directory and open/close files without having to read in the entire thing and store a list for the whole directory, with some caching possible in the future. Mostly listening in for any ideas though, if you come up with any, please share.
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am