X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Flnet%2Flib-move.c;h=34873e8d4e642a1307975e77bab3f149054f4a27;hb=3e3f70eb1ec95f32d9a97795d7fdf02cca82b5a0;hp=f273d908d5996afbc5fb1ac5d028787bc04416e1;hpb=e41f91dc90a0977f7ea85b199b7e5809c56b810e;p=fs%2Flustre-release.git diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index f273d90..34873e8 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -4513,6 +4513,7 @@ lnet_parse(struct lnet_ni *ni, struct lnet_hdr *hdr, __u32 type; int rc = 0; int cpt; + time64_t now = ktime_get_seconds(); LASSERT (!in_interrupt ()); @@ -4566,11 +4567,18 @@ lnet_parse(struct lnet_ni *ni, struct lnet_hdr *hdr, return -EPROTO; } - if (the_lnet.ln_routing && - ni->ni_net->net_last_alive != ktime_get_real_seconds()) { + /* Only update net_last_alive for incoming GETs on the reserved portal + * (i.e. incoming lnet/discovery pings). + * This avoids situations where the router's own traffic results in NI + * status changes + */ + if (the_lnet.ln_routing && type == LNET_MSG_GET && + hdr->msg.get.ptl_index == LNET_RESERVED_PORTAL && + !lnet_islocalnid(&src_nid) && + ni->ni_net->net_last_alive != now) { lnet_ni_lock(ni); spin_lock(&ni->ni_net->net_lock); - ni->ni_net->net_last_alive = ktime_get_real_seconds(); + ni->ni_net->net_last_alive = now; spin_unlock(&ni->ni_net->net_lock); push = lnet_ni_set_status_locked(ni, LNET_NI_STATUS_UP); lnet_ni_unlock(ni); @@ -4746,7 +4754,7 @@ lnet_parse(struct lnet_ni *ni, struct lnet_hdr *hdr, } } - lpni->lpni_last_alive = ktime_get_seconds(); + lpni->lpni_last_alive = now; msg->msg_rxpeer = lpni; msg->msg_rxni = ni;