Skip to content

Commit

Permalink
OSD: update heartbeat peers if unable to statfs
Browse files Browse the repository at this point in the history
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
  • Loading branch information
xiexingguo committed Feb 23, 2016
1 parent 144fa29 commit 46da33b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/osd/OSD.cc
Expand Up @@ -668,6 +668,11 @@ void OSDService::update_osd_stat(vector<int>& hb_peers)
{
Mutex::Locker lock(stat_lock);

osd_stat.hb_in.swap(hb_peers);
osd_stat.hb_out.clear();

osd->op_tracker.get_age_ms_histogram(&osd_stat.op_queue_age_hist);

// fill in osd stats too
struct statfs stbuf;
int r = osd->store->statfs(&stbuf);
Expand All @@ -688,13 +693,8 @@ void OSDService::update_osd_stat(vector<int>& hb_peers)
osd->logger->set(l_osd_stat_bytes_used, used);
osd->logger->set(l_osd_stat_bytes_avail, avail);

osd_stat.hb_in.swap(hb_peers);
osd_stat.hb_out.clear();

check_nearfull_warning(osd_stat);

osd->op_tracker.get_age_ms_histogram(&osd_stat.op_queue_age_hist);

dout(20) << "update_osd_stat " << osd_stat << dendl;
}

Expand Down

0 comments on commit 46da33b

Please sign in to comment.