diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-10 20:07:14 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-10 20:07:14 +0100 |
commit | 7014daa2355d374c57ed09a4c55c460f0486d7f3 (patch) | |
tree | 68bf29540ae3bb6b08b628522ddd2693c7470f63 /Kernel/FileSystem.h | |
parent | 052a101cc500813fc233d69f7104b7a509b9c950 (diff) | |
download | serenity-7014daa2355d374c57ed09a4c55c460f0486d7f3.zip |
Kernel: Add an LRU block cache.
This papers over some of the incredibly inefficient access patterns in the
Ext2FS implementation for a while longer. :^)
Diffstat (limited to 'Kernel/FileSystem.h')
-rw-r--r-- | Kernel/FileSystem.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/FileSystem.h b/Kernel/FileSystem.h index eab654ac51..a6564b0de9 100644 --- a/Kernel/FileSystem.h +++ b/Kernel/FileSystem.h @@ -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()); } }; |