Whamcloud - gitweb
Don't allow reconnect to already connected import.
authorshadow <shadow>
Wed, 8 Apr 2009 06:25:36 +0000 (06:25 +0000)
committershadow <shadow>
Wed, 8 Apr 2009 06:25:36 +0000 (06:25 +0000)
Branch b1_8
b=16839
i=green
i=bzzz

lustre/ChangeLog
lustre/ldlm/ldlm_lib.c
lustre/obdclass/llog_test.c

index 3d85b65..9fcf39a 100644 (file)
@@ -204,6 +204,12 @@ Details    : create_count always drops to the min value (=32) because grow_count
          information, please refer to bugzilla 17630.
 
 Severity   : normal
+Frequency  : rare, on llog test 6
+Bugzilla   : 16839
+Descriptoin: don't allow connect to already connected import
+Details    : allowing connect to already connected import is hide connecting problem.
+
+Severity   : normal
 Frequency  : rare, on failed llog setup
 Bugzilla   : 18896
 Descriptoin: don't leak obd reference on failed llog setup
index 6152596..c4cf7ce 100644 (file)
@@ -392,7 +392,7 @@ int client_connect_import(struct lustre_handle *dlm_handle,
 
         cli->cl_conn_count++;
         if (cli->cl_conn_count > 1)
-                GOTO(out_sem, rc);
+                GOTO(out_sem, rc = -EALREADY);
         *exp = class_conn2export(dlm_handle);
 
         if (obd->obd_namespace != NULL)
index 6721a7e..9e8f2bd 100644 (file)
@@ -502,8 +502,6 @@ static int llog_test_6(struct obd_device *obd, char *name)
         struct obd_device *mdc_obd;
         struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_TEST_ORIG_CTXT);
         struct obd_uuid *mds_uuid = &ctxt->loc_exp->exp_obd->obd_uuid;
-        struct lustre_handle exph = {0, };
-        struct obd_export *exp;
         struct obd_uuid uuid = {"LLOG_TEST6_UUID"};
         struct llog_handle *llh = NULL;
         struct llog_ctxt *nctxt;
@@ -517,14 +515,6 @@ static int llog_test_6(struct obd_device *obd, char *name)
                 GOTO(ctxt_release, rc = -ENOENT);
         }
 
-        rc = obd_connect(&exph, mdc_obd, &uuid, NULL /* obd_connect_data */,
-                         NULL);
-        if (rc) {
-                CERROR("6: failed to connect to MDC: %s\n", mdc_obd->obd_name);
-                GOTO(ctxt_release, rc);
-        }
-        exp = class_conn2export(&exph);
-
         nctxt = llog_get_context(mdc_obd, LLOG_CONFIG_REPL_CTXT);
         rc = llog_create(nctxt, &llh, NULL, name);
         if (rc) {
@@ -553,7 +543,7 @@ parse_out:
         if (rc) {
                 CERROR("6: llog_close failed: rc = %d\n", rc);
         }
-        rc = obd_disconnect(exp);
+
 ctxt_release:
         llog_ctxt_put(ctxt);
         RETURN(rc);