mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:17:44 +00:00
Kernel: Add an LRU block cache.
This papers over some of the incredibly inefficient access patterns in the Ext2FS implementation for a while longer. :^)
This commit is contained in:
parent
052a101cc5
commit
7014daa235
3 changed files with 122 additions and 2 deletions
|
@ -147,8 +147,7 @@ namespace AK {
|
|||
|
||||
template<>
|
||||
struct Traits<InodeIdentifier> {
|
||||
// FIXME: This is a shitty hash.
|
||||
static unsigned hash(const InodeIdentifier& inode) { return Traits<unsigned>::hash(inode.fsid()) + Traits<unsigned>::hash(inode.index()); }
|
||||
static unsigned hash(const InodeIdentifier& inode) { return pair_int_hash(inode.fsid(), inode.index()); }
|
||||
static void dump(const InodeIdentifier& inode) { kprintf("%02u:%08u", inode.fsid(), inode.index()); }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue