]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMapMapping: add assert 14979/head
authorSage Weil <sage@redhat.com>
Fri, 5 May 2017 15:47:03 +0000 (11:47 -0400)
committerSage Weil <sage@redhat.com>
Fri, 5 May 2017 15:47:03 +0000 (11:47 -0400)
This is easier to debug than walking off into memory we don't own!

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

index c325693785eaadafcd247867ffb2487b473c74d2..81996641ec059c8bfacc2c8dd86e2ad66d4a5caf 100644 (file)
@@ -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);
   }