]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::start_flush: send delete even if there are no snaps
authorSamuel Just <sam.just@inktank.com>
Mon, 12 May 2014 22:08:07 +0000 (15:08 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 12 May 2014 22:08:07 +0000 (15:08 -0700)
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 <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index eaed68d5b5710a544d0ce588bdfb0302b79d200e..4c69111fa9223dd7426fdcc3248d947f51682cae 100644 (file)
@@ -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();