]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: put repops even in TrimObjects
authorSamuel Just <sam.just@inktank.com>
Sun, 27 Oct 2013 03:21:25 +0000 (20:21 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 28 Oct 2013 20:35:17 +0000 (13:35 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 1d610ac20e1f0e1f96dae3a8786e606d4f0b95d6..ba793c90bc202d29e232208f4c746f68fb66505e 100644 (file)
@@ -8609,6 +8609,13 @@ ReplicatedPG::TrimmingObjects::TrimmingObjects(my_context ctx)
 void ReplicatedPG::TrimmingObjects::exit()
 {
   context< SnapTrimmer >().log_exit(state_name, enter_time);
+  // Clean up repops in case of reset
+  set<RepGather *> &repops = context<SnapTrimmer>().repops;
+  for (set<RepGather *>::iterator i = repops.begin();
+       i != repops.end();
+       repops.erase(i++)) {
+    (*i)->put();
+  }
 }
 
 boost::statechart::result ReplicatedPG::TrimmingObjects::react(const SnapTrim&)