Whamcloud - gitweb
LU-18279 obdclass: fix class_add_nids_to_uuid 41/56541/2
authorSergey Cheremencev <scherementsev@ddn.com>
Mon, 30 Sep 2024 13:52:05 +0000 (16:52 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 2 Dec 2024 05:51:39 +0000 (05:51 +0000)
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 <scherementsev@ddn.com>
Change-Id: Ibbedda6e28e6c26b11ae95d89ad31afd812c559f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56541
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/obdclass/lustre_peer.c

index 96eb7bd..99988c6 100644 (file)
@@ -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;