]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: do not include single AU allocations to allocation 51820/head
authorIgor Fedotov <igor.fedotov@croit.io>
Mon, 29 May 2023 14:11:37 +0000 (17:11 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Mon, 17 Jul 2023 13:25:27 +0000 (16:25 +0300)
fragmentation stats.

The rationale is that such allocations always get single framgent.

Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
src/os/bluestore/BlueStore.cc

index 7795fc7b6dc94a6815a2f928c1b62d63f8bb843b..b5fda972c0db9f1c86abb02d474d0cc8778c93af 100644 (file)
@@ -17763,9 +17763,11 @@ void BlueStore::_log_alerts(osd_alert_list_t& alerts)
 void BlueStore::_collect_allocation_stats(uint64_t need, uint32_t alloc_size,
                                           const PExtentVector& extents)
 {
-  alloc_stats_count++;
-  alloc_stats_fragments += extents.size();
-  alloc_stats_size += need;
+  if (alloc_size != min_alloc_size) {
+    alloc_stats_count++;
+    alloc_stats_fragments += extents.size();
+    alloc_stats_size += need;
+  }
 
   for (auto& e : extents) {
     logger->hinc(l_bluestore_allocate_hist, e.length, need);