mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
Ext2FS: Move block list computation from Ext2FS to Ext2FSInode
Since the inode is the logical owner of its block list, let's move the code that computes the block list there, and also stop hogging the FS lock while we compute the block list, as there is no need for it.
This commit is contained in:
@@ -82,6 +82,10 @@ private:
|
||||
bool populate_lookup_cache() const;
|
||||
KResult resize(u64);
|
||||
KResult flush_block_list();
|
||||
Vector<BlockBasedFS::BlockIndex> compute_block_list() const;
|
||||
Vector<BlockBasedFS::BlockIndex> compute_block_list_with_meta_blocks() const;
|
||||
Vector<BlockBasedFS::BlockIndex> compute_block_list_impl(bool include_block_list_blocks) const;
|
||||
Vector<BlockBasedFS::BlockIndex> compute_block_list_impl_internal(const ext2_inode& e2inode, bool include_block_list_blocks) const;
|
||||
|
||||
Ext2FS& fs();
|
||||
const Ext2FS& fs() const;
|
||||
@@ -145,9 +149,6 @@ private:
|
||||
GroupIndex group_index_from_inode(InodeIndex) const;
|
||||
GroupIndex group_index_from_block_index(BlockIndex) const;
|
||||
|
||||
Vector<BlockIndex> block_list_for_inode_impl(const ext2_inode&, bool include_block_list_blocks = false) const;
|
||||
Vector<BlockIndex> block_list_for_inode(const ext2_inode&, bool include_block_list_blocks = false) const;
|
||||
|
||||
KResultOr<bool> get_inode_allocation_state(InodeIndex) const;
|
||||
KResult set_inode_allocation_state(InodeIndex, bool);
|
||||
KResult set_block_allocation_state(BlockIndex, bool);
|
||||
|
||||
Reference in New Issue
Block a user