From: Josh Durgin Date: Sat, 9 Jul 2016 01:32:21 +0000 (-0700) Subject: ReplicatedPG: clear log update waiters during shutdown X-Git-Tag: ses5-milestone5~413^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F10170%2Fhead;p=ceph.git ReplicatedPG: clear log update waiters during shutdown This prevents leaking repops that are referenced by LogUpdateCtx for updates that were in flight. Signed-off-by: Josh Durgin --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 47f9f945966..732131afa26 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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 &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(); diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index dd860c7708c..faf85ffb217 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -915,6 +915,7 @@ protected: boost::intrusive_ptr repop; set waiting_on; }; + void cancel_log_updates(); map log_entry_update_waiting_on;