// 0 the stats for the osd
osd_stat_updates[osd] = osd_stat_t();
}
+ void stat_osd_down_up(int32_t osd, PGMap& pg_map) {
+ // 0 the op_queue_age_hist for this osd
+ map<int32_t,osd_stat_t>::iterator p = osd_stat_updates.find(osd);
+ if (p != osd_stat_updates.end()) {
+ p->second.op_queue_age_hist.clear();
+ return;
+ }
+ ceph::unordered_map<int32_t,osd_stat_t>::iterator q =
+ pg_map.osd_stat.find(osd);
+ if (q != pg_map.osd_stat.end()) {
+ osd_stat_t& t = osd_stat_updates[osd] = q->second;
+ t.op_queue_age_hist.clear();
+ }
+ }
void rm_stat(int32_t osd) {
osd_stat_rm.insert(osd);
osd_epochs.erase(osd);
if (report != last_osd_report.end()) {
last_osd_report.erase(report);
}
+
+ // clear out osd_stat slow request histogram
+ dout(20) << __func__ << " clearing osd." << p->first
+ << " request histogram" << dendl;
+ pending_inc.stat_osd_down_up(p->first, pg_map);
}
if (p->second & CEPH_OSD_EXISTS) {