Kernel: Ext2 inodes are now stored in cache
This allows faster inode access and ensures working inodes when opened in multiple places.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <BAN/HashMap.h>
|
||||
#include <kernel/Storage/StorageDevice.h>
|
||||
#include <kernel/FS/FileSystem.h>
|
||||
#include <kernel/FS/Ext2/Inode.h>
|
||||
@@ -65,6 +66,8 @@ namespace Kernel
|
||||
|
||||
BAN::ErrorOr<uint32_t> reserve_free_block(uint32_t primary_bgd);
|
||||
|
||||
BAN::HashMap<ino_t, BAN::RefPtr<Inode>>& inode_cache() { return m_inode_cache; }
|
||||
|
||||
const Ext2::Superblock& superblock() const { return m_superblock; }
|
||||
|
||||
struct BlockLocation
|
||||
@@ -104,6 +107,8 @@ namespace Kernel
|
||||
BAN::RefPtr<Inode> m_root_inode;
|
||||
BAN::Vector<uint32_t> m_superblock_backups;
|
||||
|
||||
BAN::HashMap<ino_t, BAN::RefPtr<Inode>> m_inode_cache;
|
||||
|
||||
BlockBufferManager m_buffer_manager;
|
||||
|
||||
Ext2::Superblock m_superblock;
|
||||
|
||||
Reference in New Issue
Block a user