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 <xie.xingguo@zte.com.cn>
This commit is contained in:
xie xingguo 2016-08-15 17:06:27 +08:00
parent 4f5d588bed
commit 3d12241e3b

View 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;
}