]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: reset heartbeat in export_remaining_imported_caps
authorJohn Spray <john.spray@redhat.com>
Mon, 6 Mar 2017 11:51:31 +0000 (11:51 +0000)
committerJohn Spray <john.spray@redhat.com>
Mon, 6 Mar 2017 12:01:26 +0000 (12:01 +0000)
This loop can be very long.

Fixes: http://tracker.ceph.com/issues/19118
Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDCache.cc
src/mds/MDSRank.h

index db750025ee81458f08c01686a3342cffbe9beecd..45cd9cfb7bd13c3adfba75c2262e502ef1b30a91 100644 (file)
@@ -5606,6 +5606,8 @@ void MDCache::export_remaining_imported_caps()
        mds->send_message_client_counted(stale, q->first);
       }
     }
+
+    mds->heartbeat_reset();
   }
 
   for (map<inodeno_t, list<MDSInternalContextBase*> >::iterator p = cap_reconnect_waiters.begin();
index 190592eabf5d9c1164b622fa2fb561a6e6189a7b..6f5cf1030959f4c1006ede40a042bbff89c64a76 100644 (file)
@@ -226,7 +226,6 @@ class MDSRank {
     bool _dispatch(Message *m, bool new_msg);
 
     ceph::heartbeat_handle_d *hb;  // Heartbeat for threads using mds_lock
-    void heartbeat_reset();
 
     bool is_stale_message(Message *m) const;
 
@@ -297,6 +296,12 @@ class MDSRank {
     void respawn();
     // <<<
 
+    /**
+     * Call this periodically if inside a potentially long running piece
+     * of code while holding the mds_lock
+     */
+    void heartbeat_reset();
+
     /**
      * Report state DAMAGED to the mon, and then pass on to respawn().  Call
      * this when an unrecoverable error is encountered while attempting