Whamcloud - gitweb
LU-12936 lnet: remove pt_number from lnet_peer_table. 71/36671/2
authorMr NeilBrown <neilb@suse.de>
Tue, 5 Nov 2019 02:49:16 +0000 (13:49 +1100)
committerOleg Drokin <green@whamcloud.com>
Fri, 6 Dec 2019 01:14:03 +0000 (01:14 +0000)
This fields is no longer used - except for an ASSERT().
It did have a use once, but that was removed in
Commit ffd8e881bb98 ("LU-2456 lnet: Dynamic LNet
                      Configuration (DLC)")

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I43d4c50d68fea3194f8515ac02599ef07b37ad60
Reviewed-on: https://review.whamcloud.com/36671
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/lib-types.h
lnet/lnet/peer.c

index b446414..cf2edfd 100644 (file)
@@ -783,7 +783,6 @@ struct lnet_peer_net {
  *
  * protected by lnet_net_lock/EX for update
  *    pt_version
  *
  * protected by lnet_net_lock/EX for update
  *    pt_version
- *    pt_number
  *    pt_hash[...]
  *    pt_peer_list
  *    pt_peers
  *    pt_hash[...]
  *    pt_peer_list
  *    pt_peers
@@ -795,7 +794,6 @@ struct lnet_peer_net {
  */
 struct lnet_peer_table {
        int                     pt_version;     /* /proc validity stamp */
  */
 struct lnet_peer_table {
        int                     pt_version;     /* /proc validity stamp */
-       int                     pt_number;      /* # peers_ni extant */
        struct list_head        *pt_hash;       /* NID->peer hash */
        struct list_head        pt_peer_list;   /* peers */
        int                     pt_peers;       /* # peers */
        struct list_head        *pt_hash;       /* NID->peer hash */
        struct list_head        pt_peer_list;   /* peers */
        int                     pt_peers;       /* # peers */
index 1425bd8..2cb9ba3 100644 (file)
@@ -400,8 +400,6 @@ lnet_peer_ni_del_locked(struct lnet_peer_ni *lpni, bool force)
 
        /* decrement the ref count on the peer table */
        ptable = the_lnet.ln_peer_tables[lpni->lpni_cpt];
 
        /* decrement the ref count on the peer table */
        ptable = the_lnet.ln_peer_tables[lpni->lpni_cpt];
-       LASSERT(ptable->pt_number > 0);
-       ptable->pt_number--;
 
        /*
         * The peer_ni can no longer be found with a lookup. But there
 
        /*
         * The peer_ni can no longer be found with a lookup. But there
@@ -1257,7 +1255,6 @@ lnet_peer_attach_peer_ni(struct lnet_peer *lp,
                ptable = the_lnet.ln_peer_tables[lpni->lpni_cpt];
                list_add_tail(&lpni->lpni_hashlist, &ptable->pt_hash[hash]);
                ptable->pt_version++;
                ptable = the_lnet.ln_peer_tables[lpni->lpni_cpt];
                list_add_tail(&lpni->lpni_hashlist, &ptable->pt_hash[hash]);
                ptable->pt_version++;
-               ptable->pt_number++;
                /* This is the 1st refcount on lpni. */
                atomic_inc(&lpni->lpni_refcount);
        }
                /* This is the 1st refcount on lpni. */
                atomic_inc(&lpni->lpni_refcount);
        }