Whamcloud - gitweb
set lu_device to obd, the error handling need it.
authorhuanghua <huanghua>
Wed, 6 Sep 2006 09:26:23 +0000 (09:26 +0000)
committerhuanghua <huanghua>
Wed, 6 Sep 2006 09:26:23 +0000 (09:26 +0000)
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_recovery.c

index f08853b..be62a1b 100644 (file)
@@ -2468,6 +2468,8 @@ static int mdt_init0(const struct lu_context *ctx, struct mdt_device *m,
         md_device_init(&m->mdt_md_dev, ldt);
         m->mdt_md_dev.md_lu_dev.ld_ops = &mdt_lu_ops;
         m->mdt_md_dev.md_lu_dev.ld_obd = obd;
+        /* set this lu_device to obd, because error handling need it */
+        obd->obd_lu_dev = &m->mdt_md_dev.md_lu_dev;
 
         rc = lu_site_init(s, &m->mdt_md_dev.md_lu_dev);
         if (rc) {
@@ -2779,7 +2781,8 @@ static int mdt_destroy_export(struct obd_export *export)
         ENTRY;
 
         med = &export->exp_mdt_data;
-        LASSERT(med);
+        LASSERT(mdt);
+
         target_destroy_export(export);
 
         if (obd_uuid_equals(&export->exp_client_uuid, &obd->obd_uuid))
index 6f83d7d..74e0766 100644 (file)
@@ -163,8 +163,13 @@ static int mdt_init_clients_data(const struct lu_context *ctx,
                        mcd_last_xid(mcd));
 
                 exp = class_new_export(obd, (struct obd_uuid *)mcd->mcd_uuid);
-                if (IS_ERR(exp))
+                if (IS_ERR(exp)) {
+                        rc = 0;
+                        continue;
+                        /* FIXME: Do we really want to return error?
                         GOTO(err_client, rc = PTR_ERR(exp));
+                        */
+                }
 
                 med = &exp->exp_mdt_data;
                 med->med_mcd = mcd;