Whamcloud - gitweb
Revert "b=22656 Prevent failover nids from registering with MGS first."
authorJohann Lombardi <johann@sun.com>
Fri, 28 May 2010 11:49:54 +0000 (13:49 +0200)
committerJohann Lombardi <johann@sun.com>
Fri, 28 May 2010 11:49:54 +0000 (13:49 +0200)
This reverts commit 3cadd5d8bdedef530043f8605ae23ce28ec0a40c.

This causes the following LBUG:
28807:0:(mgs_llog.c:417:mgs_check_index())
ASSERTION(!(mti->mti_flags & LDD_F_NEED_INDEX)) failed

See bug 22656 for more info.

lustre/mgs/mgs_handler.c

index 43db526..b578420 100644 (file)
@@ -59,7 +59,7 @@
 #include <lustre_fsfilt.h>
 #include <lustre_disk.h>
 #include "mgs_internal.h"
-#include <lustre_param.h>
+
 
 /* Establish a connection to the MGS.*/
 static int mgs_connect(struct lustre_handle *conn, struct obd_device *obd,
@@ -375,9 +375,6 @@ static int mgs_handle_target_reg(struct ptlrpc_request *req)
         struct mgs_target_info *mti, *rep_mti;
         int rep_size[] = { sizeof(struct ptlrpc_body), sizeof(*mti) };
         int rc = 0, lockrc;
-        char *ptr;
-        lnet_nid_t nid;
-        int i;
         ENTRY;
 
         mgs_counter_incr(req->rq_export, LPROC_MGS_TARGET_REG);
@@ -414,23 +411,6 @@ static int mgs_handle_target_reg(struct ptlrpc_request *req)
 
         OBD_FAIL_TIMEOUT(OBD_FAIL_MGS_PAUSE_TARGET_REG, 10);
 
-        /* Ensure this is not a failover node that is connecting first */
-        ptr = mti->mti_params;
-        while (class_find_param(ptr, PARAM_FAILNODE, &ptr) == 0) {
-                while (class_parse_nid(ptr, &nid, &ptr) == 0) {
-                        for (i = 0; i < mti->mti_nid_count; i++) {
-                                if (nid == mti->mti_nids[i]
-                                    && mgs_check_index(obd, mti) != 1) {
-                                        LCONSOLE_WARN("Denying registration "
-                                                      "attempt from failover "
-                                                      "nid %s\n",
-                                                      libcfs_nid2str(nid));
-                                        GOTO(out, rc = -EADDRNOTAVAIL);
-                                }
-                        }
-                }
-        }
-
         /* Log writing contention is handled by the fsdb_sem */
 
         if (mti->mti_flags & LDD_F_WRITECONF) {