Whamcloud - gitweb
LU-18106 obdclass: Fix evict-by-nid for long NIDs 81/56281/2
authorChris Horn <chris.horn@hpe.com>
Fri, 6 Sep 2024 15:27:21 +0000 (09:27 -0600)
committerOleg Drokin <green@whamcloud.com>
Thu, 12 Sep 2024 05:53:23 +0000 (05:53 +0000)
commitf38bb8e7b8b4fe35f1274626dfaf4a3e7785e10c
tree02a3e196c4f2d735f01fbc3fb7f3a7dfc9170827
parentea1fbe8807bfe641632becbede12de11e4fc471f
LU-18106 obdclass: Fix evict-by-nid for long NIDs

LNet NIDs can be up to LNET_NIDSTR_SIZE (64) bytes (including the NUL
byte), but we are only copying UUID_MAX + 3 (43) bytes of the
userspace buffer. NIDs larger than this would get truncated, no
matching export found, and thus no eviction. Fix it by copying
LNET_NIDSTR_SIZE - 1 bytes.

Test-Parameters: trivial
Test-Parameters: testlist=conf-sanity env=ONLY=91,FORCE_LARGE_NID=true,LOAD_MODULES_REMOTE=true
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I9ca15a89f0d41a6ca355a690a7f9fb25a80d8f82
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56281
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/mdt/mdt_lproc.c
lustre/obdclass/lprocfs_status_server.c