From 897566070a2b18269b101965dee71b48b1fc1c7d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 5 May 2017 11:47:03 -0400 Subject: [PATCH] osd/OSDMapMapping: add assert This is easier to debug than walking off into memory we don't own! Signed-off-by: Sage Weil --- src/osd/OSDMapMapping.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osd/OSDMapMapping.h b/src/osd/OSDMapMapping.h index c325693785e..81996641ec0 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); } -- 2.39.5