From 0c27e760c3571647c78935ec572152a67c138209 Mon Sep 17 00:00:00 2001 From: Chris Horn Date: Wed, 15 May 2019 14:07:20 -0500 Subject: [PATCH] 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 --- lnet/lnet/router_proc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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) { -- 1.8.3.1