Kernel: Refactor storage stack with u64 as file operations offset

This commit is contained in:
Jean-Baptiste Boric
2021-03-17 13:18:51 +01:00
committed by Andreas Kling
parent 999c57ef2d
commit b05b4d4b24
43 changed files with 83 additions and 83 deletions

View File

@@ -57,7 +57,7 @@ NonnullRefPtr<StorageController> StorageDevice::controller() const
return m_storage_controller;
}
KResultOr<size_t> StorageDevice::read(FileDescription&, size_t offset, UserOrKernelBuffer& outbuf, size_t len)
KResultOr<size_t> StorageDevice::read(FileDescription&, u64 offset, UserOrKernelBuffer& outbuf, size_t len)
{
unsigned index = offset / block_size();
u16 whole_blocks = len / block_size();
@@ -122,7 +122,7 @@ bool StorageDevice::can_read(const FileDescription&, size_t offset) const
return offset < (max_addressable_block() * block_size());
}
KResultOr<size_t> StorageDevice::write(FileDescription&, size_t offset, const UserOrKernelBuffer& inbuf, size_t len)
KResultOr<size_t> StorageDevice::write(FileDescription&, u64 offset, const UserOrKernelBuffer& inbuf, size_t len)
{
unsigned index = offset / block_size();
u16 whole_blocks = len / block_size();