]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: clear manifest info to fix reference mismatch
authormyoungwon oh <ohmyoungwon@gmail.com>
Tue, 30 Mar 2021 14:25:32 +0000 (23:25 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Thu, 1 Apr 2021 09:44:15 +0000 (18:44 +0900)
If the head is deleted in rollback(), manifest info also needs to be clear.

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/osd/PrimaryLogPG.cc

index 857338f5cb7c0a4e3287c0311e3809030ae7800d..68ec1f682e600ac71f8c1b7e9489abdf8d62d71a 100644 (file)
@@ -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
     }