]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: when osd is not in failure_pending, we don't need to get osd inst from osdmap. 15558/head
authorlinbing <hawkerous@gmail.com>
Thu, 8 Jun 2017 00:39:47 +0000 (08:39 +0800)
committerlinbing <hawkerous@gmail.com>
Thu, 8 Jun 2017 00:43:47 +0000 (08:43 +0800)
Signed-off-by: linbing <linbing@t2cloud.net>
src/osd/OSD.cc

index 72fe11542d096c892d62b3ce530d2d3caa85b5ea..922b070a7077291eda97b8c113f3582933da10a3 100644 (file)
@@ -5881,8 +5881,8 @@ void OSD::send_failures()
   utime_t now = ceph_clock_now();
   while (!failure_queue.empty()) {
     int osd = failure_queue.begin()->first;
-    entity_inst_t i = osdmap->get_inst(osd);
     if (!failure_pending.count(osd)) {
+      entity_inst_t i = osdmap->get_inst(osd);
       int failed_for = (int)(double)(now - failure_queue.begin()->second);
       monc->send_mon_message(new MOSDFailure(monc->get_fsid(), i, failed_for,
                                             osdmap->get_epoch()));