From 1320e29dfaee9995409a6d99b9ccaa748dc67b90 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 29 Jul 2015 11:49:57 -0700 Subject: [PATCH] OSDMonitor::preprocess_get_osdmap: send the last map as well Fixes: #12410 Backport: hammer Signed-off-by: Samuel Just --- src/mon/OSDMonitor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index e79fe090a3fe1..20f817b942dbc 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1355,13 +1355,13 @@ bool OSDMonitor::preprocess_get_osdmap(MMonGetOSDMap *m) epoch_t last = osdmap.get_epoch(); int max = g_conf->osd_map_message_max; for (epoch_t e = MAX(first, m->get_full_first()); - e < MIN(last, m->get_full_last()) && max > 0; + e <= MIN(last, m->get_full_last()) && max > 0; ++e, --max) { int r = get_version_full(e, reply->maps[e]); assert(r >= 0); } for (epoch_t e = MAX(first, m->get_inc_first()); - e < MIN(last, m->get_inc_last()) && max > 0; + e <= MIN(last, m->get_inc_last()) && max > 0; ++e, --max) { int r = get_version(e, reply->incremental_maps[e]); assert(r >= 0); -- 2.47.3