diff options
author | Sage Weil <sage@inktank.com> | 2012-06-03 20:09:27 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-06-05 11:55:53 -0700 |
commit | 8e41ac150563e56ef37b0518cfd2e23be82c7f05 (patch) | |
tree | 74f4e596a49544f0712f37466b95f3f968ca658f /src/mon | |
parent | fb6ea82f40a522b42016c903b9a8f65738b80f4b (diff) | |
download | ceph-8e41ac150563e56ef37b0518cfd2e23be82c7f05.tar.gz |
mon: clear osd_stat on osd creation/destruction
Reported-by: Vladimir Bashkirtsev <vladimir@bashkirtsev.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'src/mon')
-rw-r--r-- | src/mon/PGMonitor.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 97fbb1b3e7a..aaf104b0113 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -597,12 +597,20 @@ void PGMonitor::check_osd_map(epoch_t epoch) ++p) { if (p->second & CEPH_OSD_UP) { // true if marked up OR down, but we're too lazy to check which need_check_down_pgs = true; + // clear out the last_osd_report for this OSD map<int, utime_t>::iterator report = last_osd_report.find(p->first); if (report != last_osd_report.end()) { last_osd_report.erase(report); } } + + if (p->second & CEPH_OSD_EXISTS) { + // whether it was created *or* destroyed, we can safely drop + // it's osd_stat_t record. + dout(10) << "check_osd_map osd." << p->first << " created or destroyed" << dendl; + pending_inc.osd_stat_rm.insert(p->first); + } } } |