From: Sergey Cheremencev Date: Mon, 30 Sep 2024 13:52:05 +0000 (+0300) Subject: LU-18279 obdclass: fix class_add_nids_to_uuid X-Git-Tag: 2.16.51~147 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=2175f31fcac0d77fff6e46731b08e1e6a58223ac;p=fs%2Flustre-release.git 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 --- 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;