]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: reset heartbeat in export_remaining_imported_caps 14672/head
authorJohn Spray <john.spray@redhat.com>
Mon, 6 Mar 2017 11:51:31 +0000 (11:51 +0000)
committerNathan Cutler <ncutler@suse.com>
Thu, 20 Apr 2017 10:57:45 +0000 (12:57 +0200)
This loop can be very long.

Fixes: http://tracker.ceph.com/issues/19118
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 85071f1509beba4a390730e6a3a4332484646d63)

src/mds/MDCache.cc
src/mds/MDSRank.h

index 4985076e57ff50a5dd9a8fe737852d430b1a052d..d3e9336c36800f916405be9ed1ac0ef840ae2a39 100644 (file)
@@ -5600,6 +5600,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 c8022e6cac15ee027eefc13b66f2878bf5cda5b7..21b149a7b0f83cd475e19caf89f6398c638d6d3a 100644 (file)
@@ -225,7 +225,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);
 
@@ -291,6 +290,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