]> git.apps.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>
Fri, 30 May 2014 20:32:10 +0000 (13:32 -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>
(cherry picked from commit 2ec2182745fa7c22526a7cf3dedb25bc314c9db4)

src/osd/ReplicatedPG.cc

index b724d030425c83b58b25a88c99f31a91a867ed35..6a471c95b040a6bec24e69969431c8b3b2dcbb76 100644 (file)
@@ -6171,6 +6171,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;
@@ -6213,7 +6214,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();