From: Sage Weil Date: Fri, 21 Mar 2014 18:57:03 +0000 (-0700) Subject: Revert "ReplicatedPG: disallow trans which atomically create and remove an object" X-Git-Tag: v0.78~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=28d8e7f567fb405945c40e2ae8c964d903438631;p=ceph.git Revert "ReplicatedPG: disallow trans which atomically create and remove an object" This reverts commit 9ee108428176c93fe48ae5ae95b160eadabca9b6. This appears to break rgw in its current state; test and fix soon. --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 86c674f8f9a0..f0987bf8ba50 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -4948,12 +4948,6 @@ int ReplicatedPG::prepare_transaction(OpContext *ctx) return result; } - if (!ctx->new_obs.exists && !ctx->obs->exists) { - // We can't really represent in the log an operation which atomically - // creates and removes an object - return -EINVAL; - } - // cache: clear whiteout? if (pool.info.cache_mode == pg_pool_t::CACHEMODE_WRITEBACK) { if (ctx->user_modify && @@ -5015,9 +5009,6 @@ void ReplicatedPG::finish_ctx(OpContext *ctx, int log_op_type) } } } else if (ctx->new_snapset.clones.size()) { - // see do_op, if !new_obs.exist && !obs->exists, we returned EINVAL already - assert(ctx->obs->exists); - // save snapset on _snap hobject_t snapoid(soid.oid, soid.get_key(), CEPH_SNAPDIR, soid.hash, info.pgid.pool(), soid.get_namespace());