Fixes: http://tracker.ceph.com/issues/39439
Signed-off-by: Sage Weil <sage@redhat.com>
void OSD::heartbeat()
{
+ ceph_assert(heartbeat_lock.is_locked_by_me());
dout(30) << "heartbeat" << dendl;
// get CPU load avg
<< oldest << ".." << newest << dendl;
// ensure our local fullness awareness is accurate
- heartbeat();
+ {
+ std::lock_guard l(heartbeat_lock);
+ heartbeat();
+ }
// if our map within recent history, try to add ourselves to the osdmap.
if (osdmap->get_epoch() == 0) {