staging: lustre: ptlrpc: convert conn_hash to rhashtable
authorNeilBrown <neilb@suse.com>
Wed, 11 Apr 2018 21:54:48 +0000 (07:54 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 13:07:40 +0000 (15:07 +0200)
commitac2370ac2bc5215daf78546cd8d925510065bb7f
treea6a645ddb5d1636c0907fb6c0911ec1cc7532f79
parent0d1a9d0f175f34c83bfc66bc370d70e5e704682e
staging: lustre: ptlrpc: convert conn_hash to rhashtable

Linux has a resizeable hashtable implementation in lib,
so we should use that instead of having one in libcfs.

This patch converts the ptlrpc conn_hash to use rhashtable.
In the process we gain lockless lookup.

As connections are never deleted until the hash table is destroyed,
there is no need to count the reference in the hash table.  There
is also no need to enable automatic_shrinking.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre_net.h
drivers/staging/lustre/lustre/include/obd_support.h
drivers/staging/lustre/lustre/ptlrpc/connection.c