diff options
author | Greg Farnum <greg@inktank.com> | 2013-08-29 13:52:35 -0700 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-08-30 14:06:33 -0700 |
commit | b76953c6269a8d5af854908cf9db66b1b77fd86a (patch) | |
tree | 9cbd083e10037bb9404b16bf58a11900cca185c4 | |
parent | 665acc11acf5daed9889b6f6de184cd44aa09c88 (diff) | |
download | ceph-b76953c6269a8d5af854908cf9db66b1b77fd86a.tar.gz |
Objecter: be careful about precalculated pgids
The only current user of the precalc_pgid field is list_objects. That's
fine, but we don't want new users to inadvertently appear and somehow
break the caching/tiering stuff by forcing us to go to the base pool
when we should be talking to somebody else. Add an assert to catch
these cases.
Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r-- | src/osdc/Objecter.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 888d0694470..26741a94a08 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -1299,6 +1299,7 @@ int Objecter::recalc_op_target(Op *op) pg_t pgid = op->pgid; op->target_oloc = op->base_oloc; if (op->precalc_pgid) { + assert(op->oid.name.empty()); // make sure this is a listing op ldout(cct, 10) << "recalc_op_target have " << pgid << " pool " << osdmap->have_pg_pool(pgid.pool()) << dendl; if (!osdmap->have_pg_pool(pgid.pool())) return RECALC_OP_TARGET_POOL_DNE; |