diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 4bc3b185546..3f0688dc051 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4300,12 +4300,6 @@ void OSD::tick() assert(osd_lock.is_locked()); dout(10) << "tick" << dendl; - logger->set(l_osd_buf, buffer::get_total_alloc()); - logger->set(l_osd_history_alloc_bytes, SHIFT_ROUND_UP(buffer::get_history_alloc_bytes(), 20)); - logger->set(l_osd_history_alloc_num, buffer::get_history_alloc_num()); - logger->set(l_osd_cached_crc, buffer::get_cached_crc()); - logger->set(l_osd_cached_crc_adjusted, buffer::get_cached_crc_adjusted()); - if (is_active() || is_waiting_for_healthy()) { maybe_update_heartbeat_peers(); @@ -4342,6 +4336,12 @@ void OSD::tick_without_osd_lock() assert(tick_timer_lock.is_locked()); dout(10) << "tick_without_osd_lock" << dendl; + logger->set(l_osd_buf, buffer::get_total_alloc()); + logger->set(l_osd_history_alloc_bytes, SHIFT_ROUND_UP(buffer::get_history_alloc_bytes(), 20)); + logger->set(l_osd_history_alloc_num, buffer::get_history_alloc_num()); + logger->set(l_osd_cached_crc, buffer::get_cached_crc()); + logger->set(l_osd_cached_crc_adjusted, buffer::get_cached_crc_adjusted()); + // osd_lock is not being held, which means the OSD state // might change when doing the monitor report if (is_active() || is_waiting_for_healthy()) {