Whamcloud - gitweb
file export-do_kern_mount.patch was initially added on branch b1_5.
[fs/lustre-release.git] / lustre / obdclass / llog_test.c
index 3ceaca8..c2bceee 100644 (file)
@@ -238,6 +238,7 @@ static int llog_test_4(struct obd_device *obd)
         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;
@@ -458,14 +459,14 @@ static int llog_test_6(struct obd_device *obd, char *name)
         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);
@@ -640,15 +641,15 @@ static int llog_test_setup(struct obd_device *obd, obd_count len, void *buf)
         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);
         }
 
@@ -669,7 +670,7 @@ static int llog_test_attach(struct obd_device *dev, obd_count len, void *data)
 {
         struct lprocfs_static_vars lvars;
 
-        lprocfs_init_vars(ost, &lvars);
+        lprocfs_init_vars(llog_test, &lvars);
         return lprocfs_obd_attach(dev, lvars.obd_vars);
 }
 
@@ -697,7 +698,9 @@ static int __init llog_test_init(void)
         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");
 }