Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hkadayam authored and xiaoxichen committed Aug 14, 2024
1 parent 140cb0f commit 29a9884
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/device/physical_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ void PhysicalDev::submit_batch() { m_drive_iface->submit_batch(); }

//////////////////////////// Chunk Creation/Load related methods /////////////////////////////////////////
void PhysicalDev::format_chunks() {
auto const bitmap_size = hs_super_blk::chunk_info_bitmap_size(m_dev_info);
m_chunk_info_slots = std::make_unique< sisl::Bitset >(sisl::Bitset::max_possible_bits(bitmap_size));
m_chunk_info_slots = std::make_unique< sisl::Bitset >(std::max(1u, hs_super_blk::max_chunks_in_pdev(m_dev_info)));
auto bitmap_mem = m_chunk_info_slots->serialize(m_pdev_info.dev_attr.align_size);
HS_REL_ASSERT_EQ(bitmap_mem->size(), bitmap_size, "Bitmap size mismatch with expected size");
HS_REL_ASSERT_LE(bitmap_mem->size(), hs_super_blk::chunk_info_bitmap_size(m_dev_info),
"Chunk info serialized bitmap mismatch with expected size");
write_super_block(bitmap_mem->cbytes(), bitmap_mem->size(), hs_super_blk::chunk_sb_offset());
}

Expand Down

0 comments on commit 29a9884

Please sign in to comment.