From: Jianpeng Ma Date: Mon, 9 Jul 2018 10:35:23 +0000 (+0800) Subject: os/bluestore: batch handle get_fragmentation. X-Git-Tag: v14.0.1~888^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=122cfa9c8d254d1ebc15811a67cf8a96152dbf6f;p=ceph-ci.git os/bluestore: batch handle get_fragmentation. Signed-off-by: Jianpeng Ma --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 687a93e8a76..7ef5e91a884 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -8824,9 +8824,7 @@ void BlueStore::_txc_finish(TransContext *txc) << dendl; } } - logger->set(l_bluestore_fragmentation, - (uint64_t)(alloc->get_fragmentation(min_alloc_size) * 1000)); -} + } void BlueStore::_txc_release_alloc(TransContext *txc) { @@ -9305,6 +9303,9 @@ void BlueStore::_kv_finalize_thread() // this is as good a place as any ... _reap_collections(); + logger->set(l_bluestore_fragmentation, + (uint64_t)(alloc->get_fragmentation(min_alloc_size) * 1000)); + l.lock(); } }