Whamcloud - gitweb
LU-12929 lnet: Remove field net_state in struct lnet_net 55/36655/2
authorMr NeilBrown <neilb@suse.de>
Mon, 4 Nov 2019 00:15:42 +0000 (11:15 +1100)
committerOleg Drokin <green@whamcloud.com>
Fri, 6 Dec 2019 01:16:04 +0000 (01:16 +0000)
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 <neilb@suse.de>
Change-Id: Ia11b8c0da0286f82c43be353944e036b5ea936c6
Reviewed-on: https://review.whamcloud.com/36655
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-types.h
lnet/lnet/api-ni.c
lnet/lnet/config.c

index cf2edfd..cc02d45 100644 (file)
@@ -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;
 
index fb4b7fb..e3aa9bf 100644 (file)
@@ -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
index b3e28b1..5e367f0 100644 (file)
@@ -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;