From 427c11dc334a9285026d68150256298c91e83cc6 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Sun, 10 Dec 2023 10:10:53 -0500 Subject: [PATCH] LU-10391 nrs: use struct lnet_nid for nrs_crrn_hashfn() In the move to large NIDs nrs_crrn_hashfn() was missed. Update the hash value generated to use nidhash() since our value is much larger then 64 bits of lnet_nid_t. Test-Parameters:trivial testlist=sanityn envdefinitions=ONLY=77b Fixes: 36a199db2b ("LU-10391 ptlrpc: change cc_nid in nrs to be struct lnet_nid") Change-Id: I19d7150c773db4755b3b8a18791f1411e13fe2b3 Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53399 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Nikitas Angelinas Reviewed-by: Etienne AUJAMES Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- lustre/ptlrpc/nrs_crr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lustre/ptlrpc/nrs_crr.c b/lustre/ptlrpc/nrs_crr.c index aaaa137..73606e4 100644 --- a/lustre/ptlrpc/nrs_crr.c +++ b/lustre/ptlrpc/nrs_crr.c @@ -102,10 +102,9 @@ static struct binheap_ops nrs_crrn_heap_ops = { */ static u32 nrs_crrn_hashfn(const void *data, u32 len, u32 seed) { - const lnet_nid_t *nid = data; + const struct lnet_nid *nid = data; - seed ^= cfs_hash_64((u64)nid, 32); - return seed; + return cfs_hash_32(nidhash(nid) ^ seed, 32); } static int nrs_crrn_cmpfn(struct rhashtable_compare_arg *arg, const void *obj) -- 1.8.3.1