mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 12:05:07 +00:00
Add CoreInode::lookup() for directory lookups.
Also add a name-to-inode lookup cache to Ext2Inode. This seems like a great speedup for filesystem traversal.
This commit is contained in:
parent
8fa2d7104a
commit
5f434bc00b
7 changed files with 48 additions and 18 deletions
|
@ -25,6 +25,7 @@ private:
|
|||
virtual Unix::ssize_t read_bytes(Unix::off_t, Unix::size_t, byte* buffer, FileDescriptor*) override;
|
||||
virtual void populate_metadata() const override;
|
||||
virtual bool traverse_as_directory(Function<bool(const FileSystem::DirectoryEntry&)>) override;
|
||||
virtual InodeIdentifier lookup(const String& name) override;
|
||||
|
||||
Ext2FileSystem& fs();
|
||||
const Ext2FileSystem& fs() const;
|
||||
|
@ -32,6 +33,7 @@ private:
|
|||
|
||||
SpinLock m_lock;
|
||||
Vector<unsigned> m_block_list;
|
||||
HashMap<String, unsigned> m_child_cache;
|
||||
ext2_inode m_raw_inode;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue