Kernel: Remove the big inode lock
This moves locking to the inodes themselves which allows reducing lock times significantly. Main inodes (ext2 and tmpfs) still do contain a single big mutex that gets locked during operations but now we have the architecture to optimize these.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <BAN/StringView.h>
|
||||
#include <kernel/FS/Ext2/Definitions.h>
|
||||
#include <kernel/FS/Inode.h>
|
||||
#include <kernel/Lock/Mutex.h>
|
||||
|
||||
namespace Kernel
|
||||
{
|
||||
@@ -110,6 +111,9 @@ namespace Kernel
|
||||
Ext2::Inode m_inode;
|
||||
const uint32_t m_ino;
|
||||
|
||||
// TODO: try to reduce locking or replace this with rwlock(?)
|
||||
Mutex m_lock;
|
||||
|
||||
friend class Ext2FS;
|
||||
friend class BAN::RefPtr<Ext2Inode>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user