mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
Make page_in_from_vnode 2x faster.
...by adding a new class called Ext2Inode that inherits CoreInode. The idea is that a vnode will wrap a CoreInode rather than InodeIdentifier. Each CoreInode subclass can keep whatever caches they like. Right now, Ext2Inode caches the list of block indices since it can be very expensive to retrieve.
This commit is contained in:
@@ -54,6 +54,8 @@ auto VirtualFileSystem::makeNode(InodeIdentifier inode) -> RetainPtr<Node>
|
||||
if (!metadata.isValid())
|
||||
return nullptr;
|
||||
|
||||
auto core_inode = inode.fileSystem()->get_inode(inode);
|
||||
|
||||
InterruptDisabler disabler;
|
||||
|
||||
CharacterDevice* characterDevice = nullptr;
|
||||
@@ -74,6 +76,7 @@ auto VirtualFileSystem::makeNode(InodeIdentifier inode) -> RetainPtr<Node>
|
||||
fileSystem->retain();
|
||||
|
||||
vnode->inode = inode;
|
||||
vnode->m_core_inode = move(core_inode);
|
||||
vnode->m_cachedMetadata = { };
|
||||
|
||||
#ifdef VFS_DEBUG
|
||||
|
||||
Reference in New Issue
Block a user