From: Ken Iizawa Date: Thu, 4 Mar 2021 08:11:18 +0000 (+0900) Subject: osd: fix not using specified pool name X-Git-Tag: v17.1.0~2291^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=55ea00a501afcd53f7bd1cdb50775d307f79530e;p=ceph.git osd: fix not using specified pool name Fixes: https://tracker.ceph.com/issues/48182 Signed-off-by: Ken Iizawa --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index e084605f771..a016d27c973 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,