From: xie xingguo Date: Mon, 15 Aug 2016 09:06:27 +0000 (+0800) Subject: mon/OSDMonitor: avoid duplicated calls when determining osdmap boundary X-Git-Tag: v11.0.1~422^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3d12241e3b9f4332b7f5524e247c44789931a88d;p=ceph.git mon/OSDMonitor: avoid duplicated calls when determining osdmap boundary We have caculdated the oldest/newest map epochs already, so we can use it directly here. Signed-off-by: xie xingguo --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 851da0167663a..618493fe6ebca 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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; }