Kernel: Don't hog file system lock when doing BlockBasedFileSystem I/O

The file system lock is meant to protect the file system metadata
(super blocks, bitmaps, etc.) Not protect processes from reading
independent parts of the disk at once.

This patch introduces a new lock to protect the *block cache* instead,
which is the real thing that needs synchronization.
This commit is contained in:
Andreas Kling 2021-07-16 01:08:00 +02:00
commit a7d193951f
Notes: sideshowbarker 2024-07-18 08:59:31 +09:00
2 changed files with 7 additions and 10 deletions

View file

@ -42,6 +42,7 @@ private:
DiskCache& cache() const;
void flush_specific_block_if_needed(BlockIndex index);
mutable Lock m_cache_lock;
mutable OwnPtr<DiskCache> m_cache;
};