]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: cancel cb on blacklisted watcher 2522/head
authorSamuel Just <sam.just@inktank.com>
Thu, 11 Sep 2014 20:46:51 +0000 (13:46 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 11 Sep 2014 21:14:13 +0000 (14:14 -0700)
Fixes: #8315
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc
src/osd/Watch.h

index 615eaa358697a5f044564fb67db60c92269c921b..6d073755889ab3f98670ae57bc90ec5f5a6d7469 100644 (file)
@@ -7179,6 +7179,7 @@ void ReplicatedPG::check_blacklisted_obc_watchers(ObjectContextRef obc)
     if (get_osdmap()->is_blacklisted(ea)) {
       dout(10) << "watch: Found blacklisted watcher for " << ea << dendl;
       assert(j->second->get_pg() == this);
+      j->second->unregister_cb();
       handle_watch_timeout(j->second);
     }
   }
index ceae6ad0edc34ae962902e20baac156b56e0a920..152ea951cd2a791a32778e572439c74c0c9654e5 100644 (file)
@@ -99,6 +99,7 @@ class Notify {
   /// removes the timeout callback, called on completion or cancellation
   void unregister_cb();
 public:
+
   string gen_dbg_prefix() {
     stringstream ss;
     ss << "Notify(" << make_pair(cookie, notify_id) << " "
@@ -173,15 +174,15 @@ class Watch {
   /// Registers the timeout callback with watch_timer
   void register_cb();
 
-  /// Unregisters the timeout callback
-  void unregister_cb();
-
   /// send a Notify message when connected for notif
   void send_notify(NotifyRef notif);
 
   /// Cleans up state on discard or remove (including Connection state, obc)
   void discard_state();
 public:
+  /// Unregisters the timeout callback
+  void unregister_cb();
+
   /// NOTE: must be called with pg lock held
   ~Watch();