diff options
Diffstat (limited to 'Kernel/Devices/DiskPartition.cpp')
-rw-r--r-- | Kernel/Devices/DiskPartition.cpp | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/Kernel/Devices/DiskPartition.cpp b/Kernel/Devices/DiskPartition.cpp index d1ccb90d1b..d07961f74c 100644 --- a/Kernel/Devices/DiskPartition.cpp +++ b/Kernel/Devices/DiskPartition.cpp @@ -48,6 +48,12 @@ DiskPartition::~DiskPartition() { } +void DiskPartition::start_request(AsyncBlockDeviceRequest& request) +{ + request.add_sub_request(m_device->make_request<AsyncBlockDeviceRequest>(request.request_type(), + request.block_index() + m_block_offset, request.block_count(), request.buffer(), request.buffer_size())); +} + KResultOr<size_t> DiskPartition::read(FileDescription& fd, size_t offset, UserOrKernelBuffer& outbuf, size_t len) { unsigned adjust = m_block_offset * block_size(); @@ -92,24 +98,6 @@ bool DiskPartition::can_write(const FileDescription& fd, size_t offset) const return m_device->can_write(fd, offset + adjust); } -bool DiskPartition::read_blocks(unsigned index, u16 count, UserOrKernelBuffer& out) -{ -#ifdef OFFD_DEBUG - klog() << "DiskPartition::read_blocks " << index << " (really: " << (m_block_offset + index) << ") count=" << count; -#endif - - return m_device->read_blocks(m_block_offset + index, count, out); -} - -bool DiskPartition::write_blocks(unsigned index, u16 count, const UserOrKernelBuffer& data) -{ -#ifdef OFFD_DEBUG - klog() << "DiskPartition::write_blocks " << index << " (really: " << (m_block_offset + index) << ") count=" << count; -#endif - - return m_device->write_blocks(m_block_offset + index, count, data); -} - const char* DiskPartition::class_name() const { return "DiskPartition"; |