]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: clear chunk_map if the object is whiteouted
authormyoungwon oh <ohmyoungwon@gmail.com>
Mon, 22 Feb 2021 03:35:46 +0000 (12:35 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Mon, 29 Mar 2021 08:17:53 +0000 (17:17 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/osd/PrimaryLogPG.cc

index 7ab35bc0e17a4148246532059700a3db05f74e19..a76895abd397f145b9c8e536c1b0d0c4d9d06fb6 100644 (file)
@@ -8136,6 +8136,14 @@ inline int PrimaryLogPG::_delete_oid(
     oi.set_flag(object_info_t::FLAG_WHITEOUT);
     ctx->delta_stats.num_whiteouts++;
     t->create(soid);
+    if (oi.has_manifest()) {
+      // make no references
+      dec_all_refcount_manifest(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--;
+    }
     osd->logger->inc(l_osd_tier_whiteout);
     return 0;
   }