mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
Kernel: Merge unnecessary DiskDevice class into BlockDevice
This commit is contained in:
parent
6be880bd10
commit
88ea152b24
27 changed files with 98 additions and 212 deletions
|
@ -37,15 +37,15 @@ public:
|
|||
|
||||
virtual bool is_disk_backed() const override { return true; }
|
||||
|
||||
DiskDevice& device() { return *m_device; }
|
||||
const DiskDevice& device() const { return *m_device; }
|
||||
BlockDevice& device() { return *m_device; }
|
||||
const BlockDevice& device() const { return *m_device; }
|
||||
|
||||
virtual void flush_writes() override;
|
||||
|
||||
void flush_writes_impl();
|
||||
|
||||
protected:
|
||||
explicit DiskBackedFS(NonnullRefPtr<DiskDevice>&&);
|
||||
explicit DiskBackedFS(BlockDevice&);
|
||||
|
||||
bool read_block(unsigned index, u8* buffer, FileDescription* = nullptr) const;
|
||||
bool read_blocks(unsigned index, unsigned count, u8* buffer, FileDescription* = nullptr) const;
|
||||
|
@ -57,6 +57,6 @@ private:
|
|||
DiskCache& cache() const;
|
||||
void flush_specific_block_if_needed(unsigned index);
|
||||
|
||||
NonnullRefPtr<DiskDevice> m_device;
|
||||
NonnullRefPtr<BlockDevice> m_device;
|
||||
mutable OwnPtr<DiskCache> m_cache;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue