From: Ken Iizawa Date: Mon, 8 Feb 2021 08:36:53 +0000 (+0900) Subject: osd: add check to detect interval change X-Git-Tag: v17.1.0~2291^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=19351bee29f6bba3b11361896acca8f5544d4120;p=ceph.git osd: add check to detect interval change 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 5438cb55c54..7ee9c73f0e2 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10082,7 +10082,9 @@ struct C_gather : public Context { PrimaryLogPGRef pg; hobject_t oid; PrimaryLogPG::OpContext *ctx; - C_gather(PrimaryLogPG *pg_, hobject_t oid_, PrimaryLogPG::OpContext *ctx_) : pg(pg_), oid(oid_), ctx(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_) {} void finish(int r) override { if (r == -ECANCELED) return; @@ -10092,6 +10094,9 @@ struct C_gather : public Context { // op was cancelled return; } + if (last_peering_reset != pg->get_last_peering_reset()) { + return; + } pg->cls_gather_set_result(p, r); pg->execute_ctx(ctx); } @@ -10128,7 +10133,7 @@ int PrimaryLogPG::start_cls_gather(OpContext *ctx, std::map