From 2175f31fcac0d77fff6e46731b08e1e6a58223ac Mon Sep 17 00:00:00 2001 From: Sergey Cheremencev Date: Mon, 30 Sep 2024 16:52:05 +0300 Subject: [PATCH] LU-18279 obdclass: fix class_add_nids_to_uuid Fix class_add_nids_to_uuid to utilize all 32 (MTI_NIDS_MAX) elements in lnet_nid array instead of 31 (MTI_NIDS_MAX -1). Signed-off-by: Sergey Cheremencev Change-Id: Ibbedda6e28e6c26b11ae95d89ad31afd812c559f Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56541 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/obdclass/lustre_peer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdclass/lustre_peer.c b/lustre/obdclass/lustre_peer.c index 96eb7bd..99988c6 100644 --- a/lustre/obdclass/lustre_peer.c +++ b/lustre/obdclass/lustre_peer.c @@ -182,7 +182,7 @@ int class_add_nids_to_uuid(struct obd_uuid *uuid, struct lnet_nid *nidlist, ENTRY; - if (nid_count >= MTI_NIDS_MAX) { + if (nid_count > MTI_NIDS_MAX) { CDEBUG(D_NET, "too many NIDs (%d) for UUID '%s'\n", nid_count, obd_uuid2str(uuid)); return -ENOSPC; -- 1.8.3.1