From cd7a295baa3376a5213ee5f266118e170d50562b Mon Sep 17 00:00:00 2001 From: myoungwon oh Date: Tue, 30 Mar 2021 23:25:32 +0900 Subject: [PATCH] osd: clear manifest info to fix reference mismatch If the head is deleted in rollback(), manifest info also needs to be clear. Signed-off-by: Myoungwon Oh --- src/osd/PrimaryLogPG.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 857338f5cb7..68ec1f682e6 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -8365,6 +8365,9 @@ void PrimaryLogPG::_do_rollback_to(OpContext *ctx, ObjectContextRef rollback_to, t->remove(soid); if (obs.oi.has_manifest()) { dec_all_refcount_manifest(obs.oi, ctx); + oi.manifest.clear(); + oi.manifest.type = object_manifest_t::TYPE_NONE; + oi.clear_flag(object_info_t::FLAG_MANIFEST); ctx->delta_stats.num_objects_manifest--; ctx->cache_operation = true; // do not trigger to call ref function to calculate refcount } -- 2.39.5