Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonYao287 committed Sep 21, 2023
1 parent 5d88562 commit 28eee26
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/homestore/heap_chunk_selector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ void HeapChunkSelector::mark_chunk_selected(const uint16_t chunkID) {
for (; !heap.empty();) {
VChunk vchunk = heap.top();
heap.pop();
if (vchunk.get_chunk_id() == chunkID) break;
if (vchunk.get_chunk_id() == chunkID) {
auto pdevID = vchunk.get_pdev_id();
m_per_dev_heap[pdevID]->available_blk_count.fetch_sub(vchunk.available_blks());
break;
}
temp.emplace_back(vchunk);
}
for (auto& vchunk : temp) {
Expand Down

0 comments on commit 28eee26

Please sign in to comment.