From a965378e3af1e36b1d741dfe7cfd339816366b49 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Tue, 29 Sep 2015 17:02:57 -0700 Subject: [PATCH] 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 --- src/osd/ReplicatedPG.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index d73f350e939eb..abe526ec35490 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; } -- 2.39.5