From: Chris Horn Date: Wed, 15 May 2019 19:07:20 +0000 (-0500) Subject: LU-12302 lnet: Fix NI status in proc for loopback ni X-Git-Tag: 2.12.54~23 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=0c27e760c3571647c78935ec572152a67c138209;hp=748ede308d0eb2bb2762cae9c45978808e20a735;ds=sidebyside LU-12302 lnet: Fix NI status in proc for loopback ni The loopback NI is never really "down", but since its associated ns_status is used for other purposes that's how it is reported in proc_lnet_nis(). There's an existing check for lolnd so just hardcode the status as "up" there. Test-Parameters: trivial Signed-off-by: Chris Horn Change-Id: If3f29dbc08c14aa187b00d680d0045a7dbb7f2d8 Reviewed-on: https://review.whamcloud.com/34871 Reviewed-by: Sonia Sharma Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Amir Shehata Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/router_proc.c b/lnet/lnet/router_proc.c index bbcc0fd..24d9c0f 100644 --- a/lnet/lnet/router_proc.c +++ b/lnet/lnet/router_proc.c @@ -737,16 +737,18 @@ proc_lnet_nis(struct ctl_table *table, int write, void __user *buffer, if (the_lnet.ln_routing) last_alive = now - ni->ni_last_alive; - /* @lo forever alive */ - if (ni->ni_net->net_lnd->lnd_type == LOLND) - last_alive = 0; - lnet_ni_lock(ni); LASSERT(ni->ni_status != NULL); stat = (ni->ni_status->ns_status == LNET_NI_STATUS_UP) ? "up" : "down"; lnet_ni_unlock(ni); + /* @lo forever alive */ + if (ni->ni_net->net_lnd->lnd_type == LOLND) { + last_alive = 0; + stat = "up"; + } + /* we actually output credits information for * TX queue of each partition */ cfs_percpt_for_each(tq, i, ni->ni_tx_queues) {