23#include "pedigree/kernel/machine/Disk.h"
24#include "pedigree/kernel/process/Mutex.h"
25#include "pedigree/kernel/utilities/Cache.h"
30 DiskImage() :
Disk(), m_pBase(0), m_nSize(0), m_Cache(), m_CacheLock(), m_nAlignPoints(0) {}
37 str.assign(
"Hosted disk image");
41 str.assign(
"Hosted disk image");
52 virtual void align(uint64_t location);
54 virtual bool pin(uint64_t location);
56 virtual void unpin(uint64_t location);
59 uint64_t getAlignmentPoint(uint64_t location)
const;
60 uint64_t getPageLocation(uint64_t location)
const;
67 uint64_t m_AlignPoints[8];
68 size_t m_nAlignPoints;
virtual BufferView read(uint64_t location)
virtual void getName(String &str)
virtual void align(uint64_t location)
Sets the page boundary alignment after a specific location on the disk.
virtual size_t getBlockSize() const
Gets the preferred I/O extent of the disk.
virtual size_t getSize() const
Gets the size of the disk.
virtual bool pin(uint64_t location)
Pins a cache page.
virtual void dump(String &str)
virtual void unpin(uint64_t location)