From 2ec2182745fa7c22526a7cf3dedb25bc314c9db4 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 12 May 2014 15:08:07 -0700 Subject: [PATCH] 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 --- src/osd/ReplicatedPG.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index eaed68d5b5710..4c69111fa9223 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(); -- 2.39.5