Whamcloud - gitweb
LU-1308 Additional multihomed nid config fix
authorOleg Drokin <green@whamcloud.com>
Wed, 25 Apr 2012 19:28:22 +0000 (15:28 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 26 Apr 2012 15:32:25 +0000 (11:32 -0400)
Need to put the new nid addition at the last slot available,
not next after the last.

Change-Id: Icf9d898fba4c6e9c05f085b855a33282ea0d4b47
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2599
Reviewed-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/obdclass/lustre_peer.c

index 014e714..5b3501e 100644 (file)
@@ -128,7 +128,7 @@ int class_add_uuid(const char *uuid, __u64 nid)
 
                         if (i == entry->un_nid_count) {
                                 LASSERT(entry->un_nid_count < NIDS_MAX);
 
                         if (i == entry->un_nid_count) {
                                 LASSERT(entry->un_nid_count < NIDS_MAX);
-                                entry->un_nids[++entry->un_nid_count] = nid;
+                                entry->un_nids[entry->un_nid_count++] = nid;
                         }
                         break;
                 }
                         }
                         break;
                 }