From: Samuel Just Date: Mon, 12 May 2014 22:08:07 +0000 (-0700) Subject: ReplicatedPG::start_flush: send delete even if there are no snaps X-Git-Tag: v0.82~59^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2ec2182745fa7c22526a7cf3dedb25bc314c9db4;p=ceph.git ReplicatedPG::start_flush: send delete even if there are no snaps Even if all snaps for the clone have been removed, we still have to send the delete to ensure that when the object is recreated the new snaps aren't included in the wrong clone. Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index eaed68d5b571..4c69111fa922 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -6176,6 +6176,7 @@ int ReplicatedPG::start_flush( // construct a SnapContext appropriate for this clone/head SnapContext dsnapc; + dsnapc.seq = 0; SnapContext snapc; if (soid.snap == CEPH_NOSNAP) { snapc.seq = snapset.seq; @@ -6218,7 +6219,7 @@ int ReplicatedPG::start_flush( object_locator_t base_oloc(soid); base_oloc.pool = pool.info.tier_of; - if (!dsnapc.snaps.empty()) { + if (dsnapc.seq > 0) { ObjectOperation o; o.remove(); osd->objecter_lock.Lock();