mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
Ext2FS: Flush the super block and block group descriptors lazily
Keep dirty bits for these and override flush_writes() so that we can coalesce writes. Looks like a ~5x write performance bump on the disk_benchmark.
This commit is contained in:
@@ -98,6 +98,7 @@ private:
|
||||
virtual RefPtr<Inode> create_inode(InodeIdentifier parentInode, const String& name, mode_t, off_t size, dev_t, int& error) override;
|
||||
virtual RefPtr<Inode> create_directory(InodeIdentifier parentInode, const String& name, mode_t, int& error) override;
|
||||
virtual RefPtr<Inode> get_inode(InodeIdentifier) const override;
|
||||
virtual void flush_writes() override;
|
||||
|
||||
BlockIndex first_block_index() const;
|
||||
InodeIndex allocate_inode(GroupIndex preferred_group, off_t expected_size);
|
||||
@@ -132,6 +133,9 @@ private:
|
||||
mutable ByteBuffer m_cached_group_descriptor_table;
|
||||
|
||||
mutable HashMap<BlockIndex, RefPtr<Ext2FSInode>> m_inode_cache;
|
||||
|
||||
bool m_super_block_dirty { false };
|
||||
bool m_block_group_descriptors_dirty { false };
|
||||
};
|
||||
|
||||
inline Ext2FS& Ext2FSInode::fs()
|
||||
|
||||
Reference in New Issue
Block a user