From: Serguei Smirnov Date: Wed, 9 Jun 2021 21:22:12 +0000 (-0700) Subject: LU-14750 lnet: use ni fatal error when calculating net health X-Git-Tag: 2.14.53~61 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=86a69f9eb5cab3f9eb57afcd984a2ecd215b89df;p=fs%2Flustre-release.git LU-14750 lnet: use ni fatal error when calculating net health When ni is flagged with "fatal_error" by LND, its health score remains unaffected. This allows for the net containing such ni to be selected for tx even if it is the only ni in this net. Take "fatal_error" status of the ni into account when calculating the net health score. Test-Parameters: trivial Signed-off-by: Serguei Smirnov Change-Id: Ib76245f835f1458873f0c05ad9b6727d295857de Reviewed-on: https://review.whamcloud.com/43962 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Chris Horn Reviewed-by: Cyril Bordage Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index d60c905..835d96a 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -3177,11 +3177,12 @@ int lnet_get_net_healthv_locked(struct lnet_net *net) { struct lnet_ni *ni; int best_healthv = 0; - int healthv; + int healthv, ni_fatal; list_for_each_entry(ni, &net->net_ni_list, ni_netlist) { healthv = atomic_read(&ni->ni_healthv); - if (healthv > best_healthv) + ni_fatal = atomic_read(&ni->ni_fatal_error_on); + if (!ni_fatal && healthv > best_healthv) best_healthv = healthv; }