Whamcloud - gitweb
LU-8130 ldlm: simplify ldlm_ns_hash_defs[] 20/36220/3
authorNeilBrown <neilb@suse.com>
Fri, 20 Dec 2019 14:55:07 +0000 (09:55 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 10 Jan 2020 07:42:04 +0000 (07:42 +0000)
commit416142145c9dc66f9692907c6dcea96c82c35bdd
tree3776ae7b732560046cfea69ac679ce30595f03ab
parent1a9aafbf6317a9b8b026f69faad11e1801e1b92a
LU-8130 ldlm: simplify ldlm_ns_hash_defs[]

As the ldlm_ns_types are dense, we can use the type as
the index to the array, rather than searching through
the array for a match.
We can also discard nsd_hops as all hash tables now
use the same hops.
This makes the table smaller and the code simpler.

Change-Id: I2aebb9d533d676bed51a7422801545be4fbb7e1e
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-on: https://review.whamcloud.com/36220
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
lustre/ldlm/ldlm_resource.c