mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
Kernel/FileSystem: Rename logical_block_size -> device_block_size
This never was a logical block size, it always was a device specific block size. Ideally the block size would change in accordance to whatever the driver wants to use, but that is a change for the future. For now, let's get rid of this confusing naming.
This commit is contained in:
parent
bf1610d378
commit
d1e6e6110d
8 changed files with 41 additions and 41 deletions
|
@ -25,7 +25,7 @@ ISO9660FS::ISO9660FS(OpenFileDescription& description)
|
|||
: BlockBasedFileSystem(description)
|
||||
{
|
||||
set_block_size(logical_sector_size);
|
||||
m_logical_block_size = logical_sector_size;
|
||||
m_device_block_size = logical_sector_size;
|
||||
}
|
||||
|
||||
ISO9660FS::~ISO9660FS() = default;
|
||||
|
@ -91,7 +91,7 @@ ErrorOr<void> ISO9660FS::parse_volume_set()
|
|||
{
|
||||
VERIFY(!m_primary_volume);
|
||||
|
||||
auto block = TRY(KBuffer::try_create_with_size("ISO9660FS: Temporary volume descriptor storage"sv, m_logical_block_size, Memory::Region::Access::Read | Memory::Region::Access::Write));
|
||||
auto block = TRY(KBuffer::try_create_with_size("ISO9660FS: Temporary volume descriptor storage"sv, m_device_block_size, Memory::Region::Access::Read | Memory::Region::Access::Write));
|
||||
auto block_buffer = UserOrKernelBuffer::for_kernel_buffer(block->data());
|
||||
|
||||
auto current_block_index = first_data_area_block;
|
||||
|
@ -136,7 +136,7 @@ all_headers_read:
|
|||
return EIO;
|
||||
}
|
||||
|
||||
m_logical_block_size = LittleEndian { m_primary_volume->logical_block_size.little };
|
||||
m_device_block_size = LittleEndian { m_primary_volume->logical_block_size.little };
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -242,14 +242,14 @@ ErrorOr<NonnullLockRefPtr<ISO9660FSDirectoryEntry>> ISO9660FS::directory_entry_f
|
|||
m_directory_entry_cache.remove(m_directory_entry_cache.begin());
|
||||
}
|
||||
|
||||
if (!(data_length % logical_block_size() == 0)) {
|
||||
if (!(data_length % device_block_size() == 0)) {
|
||||
dbgln_if(ISO9660_DEBUG, "Found a directory with non-logical block size aligned data length!");
|
||||
return EIO;
|
||||
}
|
||||
|
||||
auto blocks = TRY(KBuffer::try_create_with_size("ISO9660FS: Directory traversal buffer"sv, data_length, Memory::Region::Access::Read | Memory::Region::Access::Write));
|
||||
auto blocks_buffer = UserOrKernelBuffer::for_kernel_buffer(blocks->data());
|
||||
TRY(raw_read_blocks(BlockBasedFileSystem::BlockIndex { extent_location }, data_length / logical_block_size(), blocks_buffer));
|
||||
TRY(raw_read_blocks(BlockBasedFileSystem::BlockIndex { extent_location }, data_length / device_block_size(), blocks_buffer));
|
||||
auto entry = TRY(ISO9660FSDirectoryEntry::try_create(extent_location, data_length, move(blocks)));
|
||||
m_directory_entry_cache.set(key, entry);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue