]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: clear log update waiters during shutdown 10170/head
authorJosh Durgin <jdurgin@redhat.com>
Sat, 9 Jul 2016 01:32:21 +0000 (18:32 -0700)
committerJosh Durgin <jdurgin@redhat.com>
Sat, 9 Jul 2016 01:33:14 +0000 (18:33 -0700)
This prevents leaking repops that are referenced by LogUpdateCtx for
updates that were in flight.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index 47f9f945966fa64100ec60719a7d1b390fc1d774..732131afa2620704f542fa9da121d357074170c7 100644 (file)
@@ -8791,6 +8791,13 @@ void ReplicatedPG::submit_log_entries(
   assert(r == 0);
 }
 
+void ReplicatedPG::cancel_log_updates()
+{
+  // get rid of all the LogUpdateCtx so their references to repops are
+  // dropped
+  log_entry_update_waiting_on.clear();
+}
+
 // -------------------------------------------------------
 
 void ReplicatedPG::get_watchers(list<obj_watch_item_t> &pg_watchers)
@@ -10027,6 +10034,7 @@ void ReplicatedPG::on_shutdown()
   cancel_flush_ops(false);
   cancel_proxy_ops(false);
   apply_and_flush_repops(false);
+  cancel_log_updates();
 
   pgbackend->on_change();
 
index dd860c7708ca6fbac20743c5c3e9d4423f2a8199..faf85ffb2176c113f337cc1eff8cf845d4bdd6ad 100644 (file)
@@ -915,6 +915,7 @@ protected:
     boost::intrusive_ptr<RepGather> repop;
     set<pg_shard_t> waiting_on;
   };
+  void cancel_log_updates();
   map<ceph_tid_t, LogUpdateCtx> log_entry_update_waiting_on;