Whamcloud - gitweb
LU-11641 lnet: handle discovery off
[fs/lustre-release.git] / lnet / include / lnet / lib-lnet.h
index b421990..1910c1e 100644 (file)
@@ -976,6 +976,7 @@ lnet_peer_ni_is_primary(struct lnet_peer_ni *lpni)
 }
 
 bool lnet_peer_is_uptodate(struct lnet_peer *lp);
 }
 
 bool lnet_peer_is_uptodate(struct lnet_peer *lp);
+bool lnet_is_discovery_disabled(struct lnet_peer *lp);
 bool lnet_peer_gw_discovery(struct lnet_peer *lp);
 
 static inline bool
 bool lnet_peer_gw_discovery(struct lnet_peer *lp);
 
 static inline bool
@@ -987,6 +988,9 @@ lnet_peer_needs_push(struct lnet_peer *lp)
                return true;
        if (lp->lp_state & LNET_PEER_NO_DISCOVERY)
                return false;
                return true;
        if (lp->lp_state & LNET_PEER_NO_DISCOVERY)
                return false;
+       /* if discovery is not enabled then no need to push */
+       if (lnet_peer_discovery_disabled)
+               return false;
        if (lp->lp_node_seqno < atomic_read(&the_lnet.ln_ping_target_seqno))
                return true;
        return false;
        if (lp->lp_node_seqno < atomic_read(&the_lnet.ln_ping_target_seqno))
                return true;
        return false;