]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: update heartbeat peers if unable to statfs 7703/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 19 Feb 2016 03:46:59 +0000 (11:46 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 23 Feb 2016 00:55:53 +0000 (08:55 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSD.cc

index 7345d535301b84d1ec3744827043d4c15378048b..1635e8c11911e161e684786e2ed5c9b7a0f7581b 100644 (file)
@@ -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);
@@ -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;
 }