]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: avoid duplicated calls when determining osdmap boundary
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 15 Aug 2016 09:06:27 +0000 (17:06 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 18 Aug 2016 10:05:40 +0000 (18:05 +0800)
We have caculdated the oldest/newest map epochs already,
so we can use it directly here.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/OSDMonitor.cc

index 851da0167663ae9d7187239aa57d3a9c6fb0ada5..618493fe6ebcae26bd27495088ecdaf46e11b8fc 100644 (file)
@@ -1483,8 +1483,8 @@ bool OSDMonitor::preprocess_get_osdmap(MonOpRequestRef op)
     int r = get_version(e, reply->incremental_maps[e]);
     assert(r >= 0);
   }
-  reply->oldest_map = get_first_committed();
-  reply->newest_map = osdmap.get_epoch();
+  reply->oldest_map = first;
+  reply->newest_map = last;
   mon->send_reply(op, reply);
   return true;
 }