forked from Bananymous/banan-os
Kernel: Writes to disk are not synchronous anymore
Implement "proper" DiskCache syncing
This commit is contained in:
@@ -76,12 +76,15 @@ namespace Kernel
|
||||
BAN::Vector<Partition*>& partitions() { return m_partitions; }
|
||||
const BAN::Vector<Partition*>& partitions() const { return m_partitions; }
|
||||
|
||||
BAN::ErrorOr<void> sync_disk_cache();
|
||||
|
||||
protected:
|
||||
virtual BAN::ErrorOr<void> read_sectors_impl(uint64_t lba, uint8_t sector_count, uint8_t* buffer) = 0;
|
||||
virtual BAN::ErrorOr<void> write_sectors_impl(uint64_t lba, uint8_t sector_count, const uint8_t* buffer) = 0;
|
||||
void add_disk_cache();
|
||||
|
||||
private:
|
||||
SpinLock m_lock;
|
||||
BAN::Optional<DiskCache> m_disk_cache;
|
||||
BAN::Vector<Partition*> m_partitions;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user