diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-26 18:14:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-26 18:14:02 +0100 |
commit | c3a0fd4b7a46558add30af9cf6c258e109885952 (patch) | |
tree | 305c2abb3b63bbc7bb91d5542ef414a87db3a4aa /Kernel/FileSystem/Ext2FileSystem.h | |
parent | c09921b9beb1ef7d013d471bec2211b5a9941eba (diff) | |
download | serenity-c3a0fd4b7a46558add30af9cf6c258e109885952.zip |
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.
Diffstat (limited to 'Kernel/FileSystem/Ext2FileSystem.h')
-rw-r--r-- | Kernel/FileSystem/Ext2FileSystem.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.h b/Kernel/FileSystem/Ext2FileSystem.h index 65a83afde3..71e6a31273 100644 --- a/Kernel/FileSystem/Ext2FileSystem.h +++ b/Kernel/FileSystem/Ext2FileSystem.h @@ -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); |