summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-07-28 08:55:38 -0700
committerSamuel Just <sam.just@inktank.com>2013-08-26 14:14:13 -0700
commitaceef04f7fd56935e691c7deb05f25ace653bb76 (patch)
tree2facb881b9a4a0f8b18ad3083e2b19f09ab8b2f3
parentcdbfd66249cdf91c02a88af5df5a6517688a78df (diff)
downloadceph-aceef04f7fd56935e691c7deb05f25ace653bb76.tar.gz
osd: fix off-by-one in map gap logic
If we have map 250, and monitor's first is 251, but sends 260, we can request the intervening range. Fixes: #5784 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com> (cherry picked from commit e24b50225c841a650d9303041bbe811e04bdd668)
-rw-r--r--src/osd/OSD.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
index 0581f76c578..00d114d753d 100644
--- a/src/osd/OSD.cc
+++ b/src/osd/OSD.cc
@@ -4213,7 +4213,7 @@ void OSD::handle_osd_map(MOSDMap *m)
dout(10) << "handle_osd_map message skips epochs " << osdmap->get_epoch() + 1
<< ".." << (first-1) << dendl;
if ((m->oldest_map < first && osdmap->get_epoch() == 0) ||
- m->oldest_map <= osdmap->get_epoch()) {
+ m->oldest_map <= osdmap->get_epoch() + 1) {
monc->sub_want("osdmap", osdmap->get_epoch()+1, CEPH_SUBSCRIBE_ONETIME);
monc->renew_subs();
m->put();