{
struct uuid_nid_data *data, *entry;
int found = 0;
- int rc;
+ int rc = 0;
LASSERT(nid->nid_type != 0); /* valid newconfig NID is never zero */
break;
if (i == entry->un_nid_count) {
- LASSERT(entry->un_nid_count < MTI_NIDS_MAX);
+ if (i == MTI_NIDS_MAX) {
+ rc = -EOVERFLOW;
+ break;
+ }
entry->un_nids[entry->un_nid_count++] = *nid;
}
break;
list_add(&data->un_list, &g_uuid_list);
spin_unlock(&g_uuid_lock);
+ if (rc) {
+ CWARN("%s: can't add NID %s: rc = %d\n", uuid,
+ libcfs_nidstr(nid), rc);
+ /* continue with already added NIDs */
+ }
+
if (found) {
CDEBUG(D_INFO, "found uuid %s %s cnt=%d\n", uuid,
libcfs_nidstr(nid), entry->un_nid_count);
/* Add the primary NIDs for the MGS */
i = 0;
if (IS_SERVER(lsi)) {
+ char *nidnet = lsi->lsi_lmd->lmd_nidnet;
+
/* All mgsnode are listed in lmd_mgs at this moment */
ptr = lsi->lsi_lmd->lmd_mgs;
CDEBUG(D_MOUNT, "mgs NIDs %s.\n", ptr);
if (IS_MGS(lsi)) {
- /* Use local NIDs (including LO) */
struct lnet_processid id;
+ /* Use local NIDs (including LO) */
while ((rc = LNetGetId(i++, &id, true)) != -ENOENT) {
+ if (nidnet && libcfs_str2net(nidnet) !=
+ LNET_NID_NET(&id.nid))
+ continue;
rc = do_lcfg_nid(mgcname, &id.nid,
LCFG_ADD_UUID, nidstr);
}
* by commas.
*/
while (class_parse_nid(ptr, &nid, &ptr) == 0) {
+ if (nidnet && libcfs_str2net(nidnet) !=
+ LNET_NID_NET(&nid))
+ continue;
+
rc = do_lcfg_nid(mgcname, &nid,
LCFG_ADD_UUID, nidstr);
if (rc == 0)
}
run_test 73b "Large failnode NID list in mountdata"
+cleanup_73c() {
+ LOAD_MODULES_REMOTE=true cleanup
+}
+
+test_73c() {
+ (( $OST1_VERSION >= $(version_code 2.16.54) )) ||
+ skip "Need OST version at least 2.16.54 to don't LBUG"
+
+ cleanup
+ LOAD_MODULES_REMOTE=true load_modules
+
+ INTERFACES=( $(lnet_if_list) )
+ local inf=${INTERFACES[0]}
+
+ do_facet ost1 "$LNETCTL lnet configure" ||
+ error "unable to configure lnet on ost1"
+
+ stack_trap "cleanup_73c"
+
+ for ((n = 100; n <= 135; n++)); do
+ do_facet ost1 "$LNETCTL net add --net ${NETTYPE}$n --if $inf" ||
+ skip "unable to configure net #$n on ost1"
+ done
+
+ echo "restart with 35 nets"
+ start_mgsmds
+ start_ost || error "unable to start ost1"
+}
+run_test 73c "Server mount doesn't fail with > 32 nets"
+
test_73d() { #LU-18896
(( $OST1_VERSION >= $(version_code 2.16.53) )) ||
skip "need OST >= 2.16.53 for LU-18896 fix"