1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-17 12:01:00 +00:00
serenity/Kernel/FileSystem
Andreas Kling c09921b9be Ext2FS: Don't hog FS lock while reading/writing inodes
There are two locks in the Ext2FS implementation:

* The FS lock (Ext2FS::m_lock)
  This governs access to the superblock, block group descriptors,
  and the block & inode bitmap blocks. It's held while allocating
  or freeing blocks/inodes.

* The inode lock (Ext2FSInode::m_lock)
  This governs access to the inode metadata, including the block
  list, and to the content data as well. It's held while doing
  basically anything with the inode.

Once an on-disk block/inode is allocated, it logically belongs
to the in-memory Inode object, so there's no need for the FS lock
to be taken while manipulating them, the inode lock is all you need.

This dramatically reduces the impact of disk I/O on path resolution
and various other things that look at individual inodes.
2021-02-26 17:57:38 +01:00
..
AnonymousFile.cpp Kernel: Factor address space management out of the Process class 2021-02-08 18:27:28 +01:00
AnonymousFile.h Kernel: Hoist VM range allocation up to sys$mmap() itself 2021-01-25 18:57:06 +01:00
BlockBasedFileSystem.cpp Kernel: Take FS lock in BlockBasedFS during seek/read/write operations 2021-02-26 17:15:32 +01:00
BlockBasedFileSystem.h Kernel: Make BlockBasedFS::BlockIndex a distinct integer type 2021-02-12 11:59:27 +01:00
Custody.cpp Kernel: Support read-only filesystem mounts 2020-05-29 07:53:30 +02:00
Custody.h Kernel: Support read-only filesystem mounts 2020-05-29 07:53:30 +02:00
DevFS.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
DevFS.h DevFS: Use strongly typed InodeIndex 2021-02-12 16:24:40 +01:00
DevPtsFS.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
DevPtsFS.h Kernel: Add distinct InodeIndex type 2021-02-12 10:26:29 +01:00
ext2_fs.h Meta: Split debug defines into multiple headers. 2021-01-26 21:20:00 +01:00
ext2_types.h Everywhere: Re-format with clang-format-11 2020-12-31 21:51:00 +01:00
Ext2FileSystem.cpp Ext2FS: Don't hog FS lock while reading/writing inodes 2021-02-26 17:57:38 +01:00
Ext2FileSystem.h Ext2FS: Don't hog FS lock while reading/writing inodes 2021-02-26 17:57:38 +01:00
FIFO.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
FIFO.h Kernel: Improve ProcFS behavior in low memory conditions 2021-01-03 22:12:19 +01:00
File.cpp Kernel: Hoist VM range allocation up to sys$mmap() itself 2021-01-25 18:57:06 +01:00
File.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
FileBackedFileSystem.cpp Kernel: Split BlockBasedFileSystem off FileBackedFileSystem 2020-07-05 12:26:27 +02:00
FileBackedFileSystem.h Kernel: Split BlockBasedFileSystem off FileBackedFileSystem 2020-07-05 12:26:27 +02:00
FileDescription.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
FileDescription.h Kernel: Add forgotten 'const' flag 2021-02-13 00:40:31 +01:00
FileSystem.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
FileSystem.h Kernel: Add distinct InodeIndex type 2021-02-12 10:26:29 +01:00
Inode.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Inode.h Kernel: Add distinct InodeIndex type 2021-02-12 10:26:29 +01:00
InodeFile.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
InodeFile.h Kernel: Add FIBMAP ioctl to Ext2FileSystem 2021-01-30 22:54:51 +01:00
InodeIdentifier.h Kernel: Add distinct InodeIndex type 2021-02-12 10:26:29 +01:00
InodeMetadata.h Kernel: Add distinct InodeIndex type 2021-02-12 10:26:29 +01:00
InodeWatcher.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
InodeWatcher.h Kernel: Move InodeWatcher::Event into Kernel/API/InodeWatcherEvent 2020-12-14 23:05:53 +01:00
Plan9FileSystem.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Plan9FileSystem.h Kernel: Add distinct InodeIndex type 2021-02-12 10:26:29 +01:00
ProcFS.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
ProcFS.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
TmpFS.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
TmpFS.h Kernel: Add distinct InodeIndex type 2021-02-12 10:26:29 +01:00
VirtualFileSystem.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
VirtualFileSystem.h Kernel: Implement unveil() as a prefix-tree 2020-12-26 11:54:54 +01:00