]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix off-by-one is boot subscription 1313/head
authorSage Weil <sage@inktank.com>
Sat, 22 Feb 2014 16:08:37 +0000 (08:08 -0800)
committerGreg Farnum <greg@inktank.com>
Tue, 25 Feb 2014 19:42:12 +0000 (11:42 -0800)
If we have osdmap N, we want to onetime subscribe
starting at N+1.  Among other things, it means we
hear when the NOUP flag is cleared.

This appears to have broken somewhere around
3c76b81f2f96b790b72f2088164ed8e9d5efbba1.

Fixes: #7511
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
(cherry picked from commit 70d23b9a0ad9af5ca35a627a7f93c7e610e17549)
Reviewed-by: Greg Farnum <greg@inktank.com>
src/osd/OSD.cc

index 56db88d2185b40f45e2f2e2f07b409ae4cdeb6e8..ac8cc7d6cdcac6c4f18ca275cdcc97000cb56d41 100644 (file)
@@ -3454,7 +3454,7 @@ void OSD::_maybe_boot(epoch_t oldest, epoch_t newest)
   
   // get all the latest maps
   if (osdmap->get_epoch() > oldest)
-    osdmap_subscribe(osdmap->get_epoch(), true);
+    osdmap_subscribe(osdmap->get_epoch() + 1, true);
   else
     osdmap_subscribe(oldest - 1, true);
 }