Ext2FS: Give names to some KBuffers

The more we give names to KBuffers, the easier it gets to understand
what's what in a kernel region dump. :^)
This commit is contained in:
Andreas Kling 2020-01-26 10:16:05 +01:00
parent b011857e4f
commit 1d506a935c
Notes: sideshowbarker 2024-07-19 09:48:57 +09:00

View file

@ -124,7 +124,7 @@ bool Ext2FS::initialize()
unsigned blocks_to_read = ceil_div(m_block_group_count * (unsigned)sizeof(ext2_group_desc), block_size());
BlockIndex first_block_of_bgdt = block_size() == 1024 ? 2 : 1;
m_cached_group_descriptor_table = KBuffer::create_with_size(block_size() * blocks_to_read);
m_cached_group_descriptor_table = KBuffer::create_with_size(block_size() * blocks_to_read, Region::Access::Read | Region::Access::Write, "Ext2FS: Block group descriptors");
read_blocks(first_block_of_bgdt, blocks_to_read, m_cached_group_descriptor_table.value().data());
#ifdef EXT2_DEBUG
@ -1285,7 +1285,7 @@ Ext2FS::CachedBitmap& Ext2FS::get_bitmap_block(BlockIndex bitmap_block_index)
return *cached_bitmap;
}
auto block = KBuffer::create_with_size(block_size());
auto block = KBuffer::create_with_size(block_size(), Region::Access::Read | Region::Access::Write, "Ext2FS: Cached bitmap block");
bool success = read_block(bitmap_block_index, block.data());
ASSERT(success);
m_cached_bitmaps.append(make<CachedBitmap>(bitmap_block_index, move(block)));