From ff269717fe9f3938431df1b33ca322741ea064e8 Mon Sep 17 00:00:00 2001 From: shadow Date: Wed, 8 Apr 2009 06:24:43 +0000 Subject: [PATCH] Don't allow reconnect to already connected import. Branch b1_6 b=16839 i=green i=bzzz --- lustre/ChangeLog | 6 ++++++ lustre/ldlm/ldlm_lib.c | 2 +- lustre/obdclass/llog_test.c | 12 +----------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 23ff2c5..40b6bd1 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -44,6 +44,12 @@ tbd Sun Microsystems, Inc. of Lustre filesystem with 4K stack may cause a stack overflow. For more 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 : minor Bugzilla : 18480 Description: correct count of recoverable clients diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index e5a8d15..ac013cf 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 c417d18..61ef48c 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); -- 1.8.3.1