Skip to content

Commit

Permalink
ReplicatedPG: clearing a whiteout should create the object
Browse files Browse the repository at this point in the history
This was uncovered by 7532194. 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: ceph#13281
Signed-off-by: Josh Durgin <[email protected]>
  • Loading branch information
jdurgin committed Sep 30, 2015
1 parent 8322a5c commit a965378
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/osd/ReplicatedPG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a965378

Please sign in to comment.