mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05:00
180f3f29ab
This is a large commit, since this is essentially a complete rewrite of the key low-level functions that handle reading/writing blocks. This is, however, a necessary prerequisite of being able to write holes. The previous version of `flush_block_list()` (along with its numerous helper functions) was entirely reliant on all blocks being sequential. In contrast to the previous implementation, the new version of `flush_block_list()` simply writes out the difference between the old block list and the new block list by calculating the correct indirect block(s) to update based on the relevant block's logical index. `compute_block_list()` has also been rewritten, since the estimated amount of meta blocks was incorrectly calculated for files with holes as a result of the estimated amount of blocks being a function of the file size. Since it isn't possible to accurately compute the shape of the block list without traversing it, we no longer try to perform such a computation, and instead simply search through all of the allocated indirect blocks. `compute_block_list_with_meta_blocks()` has also been removed in favor of the new `compute_meta_blocks()`, since meta blocks are fundamentally distinct from data blocks due to there being no mapping between any logical block index and the physical block index. |
||
---|---|---|
.. | ||
API | ||
Arch | ||
Boot | ||
Bus | ||
Devices | ||
FileSystem | ||
Firmware/ACPI | ||
Heap | ||
Interrupts | ||
Library | ||
Locking | ||
Memory | ||
Net | ||
Prekernel | ||
Security | ||
Syscalls | ||
Tasks | ||
Time | ||
CMakeLists.txt | ||
Debug.h.in | ||
embedmap.sh | ||
Forward.h | ||
generate-version-file.sh | ||
kprintf.cpp | ||
kstdio.h | ||
KSyms.cpp | ||
KSyms.h | ||
mkmap.sh | ||
SanCov.cpp | ||
Sections.h | ||
UnixTypes.h |