Skip to content

Commit 5cdd29f

Browse files
committed
os/bluestore: do not include single AU allocations to allocation
fragmentation stats. The rationale is that such allocations always get single framgent. Signed-off-by: Igor Fedotov <[email protected]>
1 parent 600fc5b commit 5cdd29f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/os/bluestore/BlueStore.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17763,9 +17763,11 @@ void BlueStore::_log_alerts(osd_alert_list_t& alerts)
1776317763
void BlueStore::_collect_allocation_stats(uint64_t need, uint32_t alloc_size,
1776417764
const PExtentVector& extents)
1776517765
{
17766-
alloc_stats_count++;
17767-
alloc_stats_fragments += extents.size();
17768-
alloc_stats_size += need;
17766+
if (alloc_size != min_alloc_size) {
17767+
alloc_stats_count++;
17768+
alloc_stats_fragments += extents.size();
17769+
alloc_stats_size += need;
17770+
}
1776917771

1777017772
for (auto& e : extents) {
1777117773
logger->hinc(l_bluestore_allocate_hist, e.length, need);

0 commit comments

Comments
 (0)