HomeStore icon indicating copy to clipboard operation
HomeStore copied to clipboard

Fixed the number of chunks issue

Open hkadayam opened this issue 1 year ago • 1 comments

At present the number of chunk info slots pre created is incorrectly did not convert number of bytes to bits. Fixed that issue.

hkadayam avatar May 11 '24 00:05 hkadayam

Is that better to hornor the requested num_bits instead of honor the serialize size?

we are now:

  1. round num_chunks to 4K boundary and convert to byte, to get bit_map_size
  2. bitmap_size - serialization_tax then convert to bit, to the Bitset size.

which is a bit disconnect between the original requests (num_chunks) and final bitmap available bits.

Considering doing

m_chunk_info_slots = std::make_unique< sisl::Bitset >(hs_super_blk::max_chunks_in_pdev(m_dev_info));

the bitmap_mem is align to align_size (512) not 4K but it should be fine right

Yes I adjusted the code accordingly @xiaoxichen please take a look.

hkadayam avatar May 15 '24 03:05 hkadayam

@raakella1 I see several commits in the master branch about this pr. pls do squash merge next , thx!

JacksonYao287 avatar Aug 15 '24 00:08 JacksonYao287