Improve disk emulation #3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently we generate a disk image that we work on.
For reading we can use commit
a92ab3c71e
, however for writing things are a little more complicated.We can improve the current implementation, by reusing some parts for the previous commit.
Idea:
Filesystem index will be an in memory array.
When reading/writing from/to a block use this array to lookup the associated file.
When writing, if the block is not associated with a file yet, store it in memory.
When the filesystem index is updated, check if the unassociated block is now associated with a file.
If it is now associated write it to the file and free the memory, if not keep it in memory.
This is now implemented in
ca7f1b3
.