From 4e3cf59eacbe946c2728895ca713165bf1c54a32 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 14 Mar 2016 14:24:17 -0400 Subject: [PATCH] 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 --- src/osd/OSD.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index f8553147f0b..6868b998eec 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 " -- 2.39.5