Kernel: Fix ext2 block allocation

Redo ext2 block allocation. This is now much "cleaner" although
I'm not too fond of the macros.
This commit is contained in:
Bananymous
2023-09-25 13:17:44 +03:00
parent 959fb64752
commit 0e67c6318b
2 changed files with 141 additions and 123 deletions

View File

@@ -39,9 +39,8 @@ namespace Kernel
virtual BAN::ErrorOr<void> truncate_impl(size_t) override;
private:
BAN::ErrorOr<void> for_data_block_index(uint32_t, const BAN::Function<void(uint32_t&)>&, bool allocate);
BAN::ErrorOr<uint32_t> fs_block_of_data_block_index(uint32_t data_block_index);
BAN::ErrorOr<uint32_t> data_block_index(uint32_t);
BAN::ErrorOr<uint32_t> allocate_new_block();
BAN::ErrorOr<void> sync();