From 55ea00a501afcd53f7bd1cdb50775d307f79530e Mon Sep 17 00:00:00 2001 From: Ken Iizawa Date: Thu, 4 Mar 2021 17:11:18 +0900 Subject: [PATCH] osd: fix not using specified pool name Fixes: https://tracker.ceph.com/issues/48182 Signed-off-by: Ken Iizawa --- src/osd/PrimaryLogPG.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index e084605f7711..a016d27c9735 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10109,7 +10109,9 @@ int PrimaryLogPG::start_cls_gather(OpContext *ctx, std::mapop; MOSDOp *m = static_cast(op->get_nonconst_req()); - object_locator_t oloc = m->get_object_locator(); + + auto pool_id = osd->objecter->with_osdmap(std::mem_fn(&OSDMap::lookup_pg_pool_name), pool); + object_locator_t oloc(pool_id); ObjectState& obs = ctx->new_obs; object_info_t& oi = obs.oi; @@ -10125,7 +10127,6 @@ int PrimaryLogPG::start_cls_gather(OpContext *ctx, std::mapfirst; ObjectOperation obj_op; obj_op.call(cls, method, inbl); - int64_t ret = osd->objecter->with_osdmap(std::mem_fn(&OSDMap::lookup_pg_pool_name), pool); uint32_t flags = 0; ceph_tid_t tid = osd->objecter->read( object_t(oid), oloc, obj_op, -- 2.47.3