struct llog_rec_hdr rec;
ENTRY;
+ memset(&cookie, 0, sizeof(cookie));
ctxt = llog_get_context(&obd->obd_llogs, LLOG_TEST_ORIG_CTXT);
lmr.lmr_hdr.lrh_len = lmr.lmr_tail.lrt_len = LLOG_MIN_REC_SIZE;
lmr.lmr_hdr.lrh_type = 0xf00f00;
mds_uuid = &ctxt->loc_exp->exp_obd->obd_uuid;
CWARN("6a: re-open log %s using client API\n", name);
- mdc_obd = class_find_client_obd(mds_uuid, LUSTRE_MDC_NAME, NULL);
+ mdc_obd = class_find_client_obd(mds_uuid, OBD_MDC_DEVICENAME, NULL);
if (mdc_obd == NULL) {
CERROR("6: no MDC devices connected to %s found.\n",
mds_uuid->uuid);
RETURN(-ENOENT);
}
- rc = obd_connect(&exph, mdc_obd, &uuid, 0);
+ rc = obd_connect(&exph, mdc_obd, &uuid, NULL, 0);
if (rc) {
CERROR("6: failed to connect to MDC: %s\n", mdc_obd->obd_name);
RETURN(rc);
int rc;
ENTRY;
- if (lcfg->lcfg_inllen1 < 1) {
+ if (LUSTRE_CFG_BUFLEN(lcfg, 1) < 1) {
CERROR("requires a TARGET OBD name\n");
RETURN(-EINVAL);
}
- tgt = class_name2obd(lcfg->lcfg_inlbuf1);
+ 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",
- lcfg->lcfg_inlbuf1);
+ lustre_cfg_string(lcfg, 1));
RETURN(-EINVAL);
}
{
struct lprocfs_static_vars lvars;
- lprocfs_init_vars(ost, &lvars);
+ lprocfs_init_vars(llog_test, &lvars);
return lprocfs_obd_attach(dev, lvars.obd_vars);
}
struct lprocfs_static_vars lvars;
lprocfs_init_vars(llog_test, &lvars);
- return class_register_type(&llog_obd_ops, NULL, lvars.module_vars,
+
+ return class_register_type(&llog_obd_ops, NULL,
+ lvars.module_vars,
"llog_test");
}