From: Josh Durgin Date: Wed, 30 Sep 2015 00:02:57 +0000 (-0700) Subject: ReplicatedPG: clearing a whiteout should create the object X-Git-Tag: v9.1.0~41^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6118%2Fhead;p=ceph.git ReplicatedPG: clearing a whiteout should create the object This was uncovered by 75321943729f1d5dfacb68645e3c5483740d66f8. Since rbd_create() does a stat, the obc is cached as a whiteout, and the subsequent create(EXCL) would fall through to return false from maybe_create_new_object(). This would then skip adding a touch() to the transaction. Fixes: #13281 Signed-off-by: Josh Durgin --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index d73f350e939..abe526ec354 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -3749,6 +3749,7 @@ bool ReplicatedPG::maybe_create_new_object(OpContext *ctx) dout(10) << __func__ << " clearing whiteout on " << obs.oi.soid << dendl; ctx->new_obs.oi.clear_flag(object_info_t::FLAG_WHITEOUT); --ctx->delta_stats.num_whiteouts; + return true; } return false; }