]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: assert that we don't try to use an OSDMap > superblock.newest_map 8096/head
authorSage Weil <sage@redhat.com>
Mon, 14 Mar 2016 18:24:17 +0000 (14:24 -0400)
committerSage Weil <sage@redhat.com>
Thu, 17 Mar 2016 16:58:54 +0000 (12:58 -0400)
handle_osd_map now adds OSDMaps to the cache as it receives them
but before they are stable.  Ensure that we don't try to use them.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc

index f8553147f0b7a006926f60cb52e03f5f7aeaf70d..6868b998eec88b36a6aa59686a519672ad2bee69 100644 (file)
@@ -1398,6 +1398,7 @@ void OSDService::handle_misdirected_op(PG *pg, OpRequestRef op)
        * splitting.  The simplest thing is to detect such cases here and drop
        * them without an error (the client will resend anyway).
        */
+    assert(m->get_map_epoch() <= superblock.newest_map);
     OSDMapRef opmap = try_get_map(m->get_map_epoch());
     if (!opmap) {
       dout(7) << __func__ << ": " << *pg << " no longer have map for "