From 93147a95e093efe7d94ff3e53fe6a957b4cd1d72 Mon Sep 17 00:00:00 2001 From: huanghua Date: Wed, 6 Sep 2006 09:26:23 +0000 Subject: [PATCH] set lu_device to obd, the error handling need it. --- lustre/mdt/mdt_handler.c | 5 ++++- lustre/mdt/mdt_recovery.c | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index f08853b..be62a1b 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -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)) diff --git a/lustre/mdt/mdt_recovery.c b/lustre/mdt/mdt_recovery.c index 6f83d7d..74e0766 100644 --- a/lustre/mdt/mdt_recovery.c +++ b/lustre/mdt/mdt_recovery.c @@ -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; -- 1.8.3.1