]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: clearing a whiteout should create the object 6118/head
authorJosh Durgin <jdurgin@redhat.com>
Wed, 30 Sep 2015 00:02:57 +0000 (17:02 -0700)
committerJosh Durgin <jdurgin@redhat.com>
Wed, 30 Sep 2015 00:04:59 +0000 (17:04 -0700)
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 <jdurgin@redhat.com>
src/osd/ReplicatedPG.cc

index d73f350e939eb362045eb4451287887e84b074e7..abe526ec354905ef67aa5c44620547cea986a5eb 100644 (file)
@@ -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;
 }