From: Sage Weil Date: Mon, 14 Mar 2016 18:24:17 +0000 (-0400) Subject: osd: assert that we don't try to use an OSDMap > superblock.newest_map X-Git-Tag: v10.1.0~55^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F8096%2Fhead;p=ceph.git osd: assert that we don't try to use an OSDMap > superblock.newest_map 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 --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index f8553147f0b7..6868b998eec8 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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 "