Skip to content

Commit

Permalink
osd/OSDMapMapping: add assert
Browse files Browse the repository at this point in the history
This is easier to debug than walking off into memory we don't own!

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed May 5, 2017
1 parent ab7df6d commit 8975660
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/osd/OSDMapMapping.h
Expand Up @@ -285,6 +285,7 @@ class OSDMapMapping {
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);
}

Expand Down

0 comments on commit 8975660

Please sign in to comment.