From: Sage Weil Date: Tue, 28 Mar 2017 13:22:53 +0000 (-0400) Subject: osd/PrimaryLogPG: clear whiteout on exists=false objects in obc cache X-Git-Tag: v12.0.3~28^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f016d4f3897024f92d36155b718ec9c79228e3f7;p=ceph.git osd/PrimaryLogPG: clear whiteout on exists=false objects in obc cache Signed-off-by: Sage Weil --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index a5e5c3492d66..987e7857cb99 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -4324,6 +4324,7 @@ void PrimaryLogPG::maybe_create_new_object( if (!obs.exists) { ctx->delta_stats.num_objects++; obs.exists = true; + assert(!obs.oi.is_whiteout()); obs.oi.new_object(); if (!ignore_transaction) ctx->op_t->create(obs.oi.soid); @@ -6538,6 +6539,7 @@ inline int PrimaryLogPG::_delete_oid( if (oi.is_whiteout()) { dout(20) << __func__ << " deleting whiteout on " << soid << dendl; ctx->delta_stats.num_whiteouts--; + oi.clear_flag(object_info_t::FLAG_WHITEOUT); } if (oi.is_cache_pinned()) { ctx->delta_stats.num_objects_pinned--;