X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Flnet%2Flib-move.c;h=96fb6dbf68ed5a75fd11b616d98382b767e1d9f0;hb=2118a8b92cec2df85d1bdbe2e58b389d83fe06b2;hp=c760a92945966e1fd860bdb3a970773d5b66e330;hpb=51a5b4df5bbbf5fd12c73d2722b230e93fe93327;p=fs%2Flustre-release.git diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index c760a92..96fb6db 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -1854,17 +1854,16 @@ lnet_parse(lnet_ni_t *ni, lnet_hdr_t *hdr, lnet_nid_t from_nid, return -EPROTO; } - if (the_lnet.ln_routing) { - cfs_time_t now = cfs_time_current(); - - LNET_LOCK(); - - ni->ni_last_alive = now; - if (ni->ni_status != NULL && - ni->ni_status->ns_status == LNET_NI_STATUS_DOWN) - ni->ni_status->ns_status = LNET_NI_STATUS_UP; + if (the_lnet.ln_routing && + ni->ni_last_alive != cfs_time_current_sec()) { + LNET_LOCK(); - LNET_UNLOCK(); + /* NB: so far here is the only place to set NI status to "up */ + ni->ni_last_alive = cfs_time_current_sec(); + if (ni->ni_status != NULL && + ni->ni_status->ns_status == LNET_NI_STATUS_DOWN) + ni->ni_status->ns_status = LNET_NI_STATUS_UP; + LNET_UNLOCK(); } /* Regard a bad destination NID as a protocol error. Senders should