From: shadow Date: Wed, 8 Apr 2009 06:25:36 +0000 (+0000) Subject: Don't allow reconnect to already connected import. X-Git-Tag: v1_8_0_110~118 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=78cf73bd424912642131e0a4f7c06752c0e2a46f;p=fs%2Flustre-release.git Don't allow reconnect to already connected import. Branch b1_8 b=16839 i=green i=bzzz --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 3d85b65..9fcf39a 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -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 diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 6152596..c4cf7ce 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -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) diff --git a/lustre/obdclass/llog_test.c b/lustre/obdclass/llog_test.c index 6721a7e..9e8f2bd 100644 --- a/lustre/obdclass/llog_test.c +++ b/lustre/obdclass/llog_test.c @@ -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);