From: Ken Iizawa Date: Fri, 12 Feb 2021 10:15:14 +0000 (+0900) Subject: osd: modify C_gather to erase CLSGatherOp from cls_gather_ops X-Git-Tag: v17.1.0~2291^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=87e4b9714fe3bc157b376e9167db25b858772976;p=ceph.git osd: modify C_gather to erase CLSGatherOp from cls_gather_ops 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 7ee9c73f0e2..d88f2a178e0 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10083,8 +10083,9 @@ struct C_gather : public Context { hobject_t oid; PrimaryLogPG::OpContext *ctx; epoch_t last_peering_reset; - C_gather(PrimaryLogPG *pg_, hobject_t oid_, PrimaryLogPG::OpContext *ctx_, epoch_t lpr_) : - pg(pg_), oid(oid_), ctx(ctx_), last_peering_reset(lpr_) {} + OSDOp *osd_op; + C_gather(PrimaryLogPG *pg_, hobject_t oid_, PrimaryLogPG::OpContext *ctx_, epoch_t lpr_, OSDOp *osd_op_) : + pg(pg_), oid(oid_), ctx(ctx_), last_peering_reset(lpr_), osd_op(osd_op_) {} void finish(int r) override { if (r == -ECANCELED) return; @@ -10097,7 +10098,8 @@ struct C_gather : public Context { if (last_peering_reset != pg->get_last_peering_reset()) { return; } - pg->cls_gather_set_result(p, r); + osd_op->rval = r; + pg->cls_gather_ops.erase(p); pg->execute_ctx(ctx); } }; @@ -10132,8 +10134,8 @@ int PrimaryLogPG::start_cls_gather(OpContext *ctx, std::map