-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upper directory (in-memory fs) should act as a block cache #2
Comments
How is this implemented in our inspirations? |
On this line of thinking, one also needs to consider how to handle functions like Another thing to consider is |
One issue is knowing which blocks have been read into The "paging" system can be implemented by maintaining an in-memory index, an internal private object that keeps track of chunk mapping. One other thing that I don't think is really an issue now (or might not ever be an issue) is concurrency with multiple instances of EFS. If there ever was multiple instances of EFS operating on the same file, we would need to ensure that the in-memory blocks are consistent with those in the encrypted chunk on the I can see this maybe happening in distributed file systems, but it would be easy to circumvent by only sending from |
This has been implemented for |
Closing on account of migration to gitlab |
Similar to a page cache in operating systems, all read and write file operations can be tried against the image of the file contained the VFS first. This would be on a block level basis. If the desired block is not present in the file image inside the upper directory (VFS), a 'block fault' would occur. Now the corresponding block, persisted on disk, would be read, decrypted then populated in the image in the upper dir.
Every subsequent read of the block would simple be retrieved from memory, instead of performing a disk read.
Every write would also populate the upper dir image as well to ensure the block in the upper dir contains the most up-to-date data.
With this measures, blocks in the upper dir image cannot become 'dirty'. So the integrity of every read of loaded blocks in the upper dir is guaranteed.
To know which blocks are currently loaded in a file in the upper dir, a set for each file containing the loaded block numbers can be maintained. Block numbers would only be added never removed.
The text was updated successfully, but these errors were encountered: