From: Mr NeilBrown Date: Mon, 4 Nov 2019 00:15:42 +0000 (+1100) Subject: LU-12929 lnet: Remove field net_state in struct lnet_net X-Git-Tag: 2.13.51~122 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=df3904c3486c71da586d43fbfca8f126b5764838 LU-12929 lnet: Remove field net_state in struct lnet_net lnet_net.net_state is set but never used. So the code that sets it isn't tested and might be wrong. Best to just remove it. Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: Ia11b8c0da0286f82c43be353944e036b5ea936c6 Reviewed-on: https://review.whamcloud.com/36655 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Chris Horn Reviewed-by: Amir Shehata Reviewed-by: Oleg Drokin --- diff --git a/lnet/include/lnet/lib-types.h b/lnet/include/lnet/lib-types.h index cf2edfd..cc02d45 100644 --- a/lnet/include/lnet/lib-types.h +++ b/lnet/include/lnet/lib-types.h @@ -413,9 +413,6 @@ struct lnet_net { /* dying LND instances */ struct list_head net_ni_zombie; - /* network state */ - enum lnet_net_state net_state; - /* when I was last alive */ time64_t net_last_alive; diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index fb4b7fb..e3aa9bf 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -2113,8 +2113,6 @@ lnet_shutdown_lndnet(struct lnet_net *net) lnet_net_lock(LNET_LOCK_EX); - net->net_state = LNET_NET_STATE_DELETING; - list_del_init(&net->net_list); while (!list_empty(&net->net_ni_list)) { @@ -2424,7 +2422,6 @@ lnet_startup_lndnet(struct lnet_net *net, struct lnet_lnd_tunables *tun) */ lnet_net_free(net); } else { - net->net_state = LNET_NET_STATE_ACTIVE; /* * restore tunables after it has been overwitten by the * lnd diff --git a/lnet/lnet/config.c b/lnet/lnet/config.c index b3e28b1..5e367f0 100644 --- a/lnet/lnet/config.c +++ b/lnet/lnet/config.c @@ -381,7 +381,6 @@ lnet_net_alloc(__u32 net_id, struct list_head *net_list) net->net_id = net_id; net->net_last_alive = ktime_get_real_seconds(); - net->net_state = LNET_NET_STATE_INIT; /* initialize global paramters to undefiend */ net->net_tunables.lct_peer_timeout = -1;