From a6767d0991a90e7b989136fa1ad848846d4874d8 Mon Sep 17 00:00:00 2001 From: myoungwon oh Date: Mon, 22 Feb 2021 12:35:46 +0900 Subject: [PATCH] osd: clear chunk_map if the object is whiteouted Signed-off-by: Myoungwon Oh --- src/osd/PrimaryLogPG.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 7ab35bc0e17..a76895abd39 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -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; } -- 2.39.5