Commit 5412d816 authored by Alyona Romanenko's avatar Alyona Romanenko Committed by Greg Kroah-Hartman

staging: lustre: issue in the offset in lnet match hash table

the offset in hash table is overflowed for no wildcard portal.
The offset for no wildcard has been corrected as for wildcard
in the LU-1622
Signed-off-by: default avatarAlyona Romanenko <alyona.romanenko@seagate.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7774
Reviewed-on: http://review.whamcloud.com/18422Reviewed-by: default avatarDoug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 15dd2536
...@@ -360,16 +360,15 @@ lnet_mt_match_head(struct lnet_match_table *mtable, ...@@ -360,16 +360,15 @@ lnet_mt_match_head(struct lnet_match_table *mtable,
lnet_process_id_t id, __u64 mbits) lnet_process_id_t id, __u64 mbits)
{ {
struct lnet_portal *ptl = the_lnet.ln_portals[mtable->mt_portal]; struct lnet_portal *ptl = the_lnet.ln_portals[mtable->mt_portal];
unsigned long hash = mbits;
if (lnet_ptl_is_wildcard(ptl)) { if (!lnet_ptl_is_wildcard(ptl)) {
return &mtable->mt_mhash[mbits & LNET_MT_HASH_MASK]; hash += id.nid + id.pid;
} else {
unsigned long hash = mbits + id.nid + id.pid;
LASSERT(lnet_ptl_is_unique(ptl)); LASSERT(lnet_ptl_is_unique(ptl));
hash = hash_long(hash, LNET_MT_HASH_BITS); hash = hash_long(hash, LNET_MT_HASH_BITS);
return &mtable->mt_mhash[hash];
} }
return &mtable->mt_mhash[hash & LNET_MT_HASH_MASK];
} }
int int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment