void
lnet_ni_query_locked(lnet_ni_t *ni, lnet_peer_t *lp)
{
- cfs_time_t last_alive = 0;
+ cfs_time_t last_alive = 0;
LASSERT(lnet_peer_aliveness_enabled(lp));
LASSERT(ni->ni_lnd->lnd_query != NULL);
- LASSERT(the_lnet.ln_routing == 1);
lnet_net_unlock(lp->lp_cpt);
(ni->ni_lnd->lnd_query)(ni, lp->lp_nid, &last_alive);
cfs_time_t deadline;
LASSERT (lnet_peer_aliveness_enabled(lp));
- LASSERT (the_lnet.ln_routing == 1);
/* Trust lnet_notify() if it has more recent aliveness news, but
* ignore the initial assumed death (see lnet_peers_start_down()).
{
cfs_time_t now = cfs_time_current();
- /* LU-630: only router checks peer health. */
- if (the_lnet.ln_routing == 0)
- return 1;
-
if (!lnet_peer_aliveness_enabled(lp))
return -ENODEV;
int hops;
int cpt;
__u32 order = 2;
+ cfs_list_t *rn_list;
/* if !local_nid_dist_zero, I don't return a distance of 0 ever
* (when lustre sees a distance of 0, it substitutes 0@lo), so I
if (orderp != NULL)
*orderp = order;
lnet_net_unlock(cpt);
- return 1;
- }
+ return 1;
+ }
- order++;
- }
+ order++;
+ }
- cfs_list_for_each (e, &the_lnet.ln_remote_nets) {
+ rn_list = lnet_net2rnethash(dstnet);
+ cfs_list_for_each(e, rn_list) {
rnet = cfs_list_entry(e, lnet_remotenet_t, lrn_list);
if (rnet->lrn_net == dstnet) {