@@ -3526,6 +3526,12 @@ u32 lnet_get_dlc_seq_locked(void)
value = LNET_MAX_HEALTH_VALUE;
else
value = cfg->rh_value;
+ CDEBUG(D_NET,
+ "Manually setting healthv to %d for %s:%s. all = %d\n",
+ value,
+ (cfg->rh_type == LNET_HEALTH_TYPE_LOCAL_NI) ?
+ "local" : "peer",
+ libcfs_nid2str(cfg->rh_nid), cfg->rh_all);
mutex_lock(&the_lnet.ln_api_mutex);
if (cfg->rh_type == LNET_HEALTH_TYPE_LOCAL_NI)
lnet_ni_set_healthv(cfg->rh_nid, value,
@@ -3484,6 +3484,10 @@ int lnet_get_peer_info(struct lnet_ioctl_peer_cfg *cfg, void __user *bulk)
if (!all) {
lnet_net_lock(LNET_LOCK_EX);
lpni = lnet_find_peer_ni_locked(nid);
+ if (!lpni) {
+ lnet_net_unlock(LNET_LOCK_EX);
+ return;
+ }
atomic_set(&lpni->lpni_healthv, value);
lnet_peer_ni_add_to_recoveryq_locked(lpni);
lnet_peer_ni_decref_locked(lpni);