* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
struct obd_device *mgc_obd;
struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_TEST_ORIG_CTXT);
struct obd_uuid *mgs_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;
GOTO(ctxt_release, rc = -ENOENT);
}
- rc = obd_connect(NULL, &exph, mgc_obd, &uuid,
+ rc = obd_connect(NULL, &exp, mgc_obd, &uuid,
NULL /* obd_connect_data */, NULL);
- if (rc) {
- CERROR("6: failed to connect to MGC: %s\n", mgc_obd->obd_name);
- GOTO(ctxt_release, rc);
+ if (rc != -EALREADY) {
+ CERROR("6: connect on connected MDC (%s) failed to return"
+ " -EALREADY", mgc_obd->obd_name);
+ if (rc == 0)
+ obd_disconnect(exp);
+ GOTO(ctxt_release, rc = -EINVAL);
}
- exp = class_conn2export(&exph);
nctxt = llog_get_context(mgc_obd, LLOG_CONFIG_REPL_CTXT);
rc = llog_create(nctxt, &llh, NULL, name);
if (rc) {
CERROR("6: llog_close failed: rc = %d\n", rc);
}
- rc = obd_disconnect(exp);
ctxt_release:
llog_ctxt_put(ctxt);
RETURN(rc);
static int llog_test_llog_init(struct obd_device *obd,
struct obd_llog_group *olg,
- struct obd_device *tgt, int count,
- struct llog_catid *logid, struct obd_uuid *uuid)
+ struct obd_device *tgt, int *index)
{
int rc;
ENTRY;
RETURN(-EINVAL);
}
+ /* disk obd */
tgt = class_name2obd(lustre_cfg_string(lcfg, 1));
if (!tgt || !tgt->obd_attached || !tgt->obd_set_up) {
CERROR("target device not attached or not set up (%s)\n",
RETURN(-EINVAL);
}
- rc = obd_llog_init(obd, NULL, tgt, 0, NULL, NULL);
+ rc = obd_llog_init(obd, NULL, tgt, NULL);
if (rc)
RETURN(rc);
- llog_test_rand = ll_rand();
+ llog_test_rand = cfs_rand();
rc = llog_run_tests(obd);
if (rc)