]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: cancel cb on blacklisted watcher
authorSamuel Just <sam.just@inktank.com>
Thu, 11 Sep 2014 20:46:51 +0000 (13:46 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 30 Oct 2014 20:49:20 +0000 (13:49 -0700)
Fixes: #8315
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 16bd45777166c29c433af3b59254a7169e512d98)

src/osd/ReplicatedPG.cc
src/osd/Watch.h

index 95f710c8380c7b95a314f3351735f51754d34c76..bfa55c61d30c8002c2d728a5a7939f8ef9156440 100644 (file)
@@ -6973,6 +6973,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 e2cbfc1b6870d03ab23cc53c7e0e299048af7ad3..91a45749e0667687cbf5429a084c25c114338207 100644 (file)
@@ -98,6 +98,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) << " "
@@ -172,15 +173,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();