mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 10:20:52 +00:00
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.
58 KiB
58 KiB