mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 09:04:30 +00:00
Ext2FS: Inode allocation improvements
This patch combines inode the scan for an available inode with the updating of the bit in the inode bitmap into a single operation. We also exit the scan immediately when we find an inode, instead of continuing until we've scanned all the eligible groups(!) Finally, we stop holding the filesystem lock throughout the entire operation, and instead only take it while actually necessary (during inode allocation, flush, and inode cache update.)
This commit is contained in:
@@ -140,7 +140,7 @@ private:
|
||||
virtual void flush_writes() override;
|
||||
|
||||
BlockIndex first_block_index() const;
|
||||
KResultOr<InodeIndex> find_a_free_inode(GroupIndex preferred_group = 0);
|
||||
KResultOr<InodeIndex> allocate_inode(GroupIndex preferred_group = 0);
|
||||
KResultOr<Vector<BlockIndex>> allocate_blocks(GroupIndex preferred_group_index, size_t count);
|
||||
GroupIndex group_index_from_inode(InodeIndex) const;
|
||||
GroupIndex group_index_from_block_index(BlockIndex) const;
|
||||
|
||||
Reference in New Issue
Block a user