[LU-17054] lnetctl cpt-of-nid returns wrong result for kfi NIDs Created: 25/Aug/23  Updated: 18/Jan/24  Resolved: 18/Nov/23

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.16.0

Type: Bug Priority: Minor
Reporter: Chris Horn Assignee: Chris Horn
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

lnetctl cpt-of-nid uses a userspace implementation of the kernel hash_long() function. But the kernel code has changed since the userspace implementation was created, and these two versions produce different results.

Lustre still works on kernels going back to 3.10. Those kernels have the old hash method, thus it is not sufficient to merely update the userspace hash_long() to the latest kernel version (plus this is still susceptible to future drift). Better solution for cpt-of-nid command is to implement an ioctl/netlink to execute the kernel code and return result to userspace.



 Comments   
Comment by Gerrit Updater [ 18/Nov/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52502/
Subject: LU-17054 lnet: Change cpt-of-nid to get result from kernel
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 466e25a6a35f140a34d14ddc75076872e2b35a0c

Comment by Peter Jones [ 18/Nov/23 ]

Landed for 2.16

Comment by Andreas Dilger [ 04/Jan/24 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53596
Subject: LU-17054 lnet: use GFP_KERNEL for alloc w/o spinlock
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e350ef897ca9820688fbcd91ee0c8668374362f7

Comment by Gerrit Updater [ 18/Jan/24 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53596/
Subject: LU-17054 lnet: use GFP_KERNEL for alloc w/o spinlock
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9c1deba3846437268f2053860bafed2cd6a9b791

Generated at Sat Feb 10 03:32:14 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.