From: Sage Weil Date: Fri, 5 May 2017 15:47:03 +0000 (-0400) Subject: osd/OSDMapMapping: add assert X-Git-Tag: v12.0.3~69^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14979%2Fhead;p=ceph.git osd/OSDMapMapping: add assert This is easier to debug than walking off into memory we don't own! Signed-off-by: Sage Weil --- diff --git a/src/osd/OSDMapMapping.h b/src/osd/OSDMapMapping.h index c325693785ea..81996641ec05 100644 --- a/src/osd/OSDMapMapping.h +++ b/src/osd/OSDMapMapping.h @@ -285,6 +285,7 @@ public: int *acting_primary) const { auto p = pools.find(pgid.pool()); assert(p != pools.end()); + assert(pgid.ps() < p->second.pg_num); p->second.get(pgid.ps(), up, up_primary, acting, acting_primary); }