From 5ab8a195f8aae54f2531204ed5ff24546b84a4eb Mon Sep 17 00:00:00 2001 From: huanghua Date: Thu, 14 Sep 2006 03:10:12 +0000 Subject: [PATCH] call mds_postrecv() by pointer, not directly. --- lustre/include/lustre_mds.h | 1 - lustre/mdd/mdd_handler.c | 8 ++++---- lustre/mds/handler.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lustre/include/lustre_mds.h b/lustre/include/lustre_mds.h index cfdcd10..a757df4 100644 --- a/lustre/include/lustre_mds.h +++ b/lustre/include/lustre_mds.h @@ -88,7 +88,6 @@ int mds_log_op_setattr(struct obd_device *obd, struct inode *inode, int mds_lov_write_objids(struct obd_device *obd); void mds_lov_update_objids(struct obd_device *obd, obd_id *ids); void mds_objids_from_lmm(obd_id *, struct lov_mds_md *, struct lov_desc *); -int mds_postrecov(struct obd_device *); /* ioctls for trying requests */ #define IOC_REQUEST_TYPE 'f' diff --git a/lustre/mdd/mdd_handler.c b/lustre/mdd/mdd_handler.c index 42eda9a..db5a13a 100644 --- a/lustre/mdd/mdd_handler.c +++ b/lustre/mdd/mdd_handler.c @@ -580,6 +580,7 @@ static int mdd_recovery_complete(const struct lu_context *ctxt, { struct mdd_device *mdd = lu2mdd_dev(d); struct lu_device *next = &mdd->mdd_child->dd_lu_dev; + struct obd_device *obd = mdd2obd_dev(mdd); int rc; ENTRY; /* TODO: @@ -596,11 +597,10 @@ static int mdd_recovery_complete(const struct lu_context *ctxt, OBD_NOTIFY_SYNC, NULL); */ LASSERT(mdd); - LASSERT(mdd->mdd_obd_dev); + LASSERT(obd); - mdd->mdd_obd_dev->obd_recovering = 0; - //mdd->mdd_obd_dev->obd_type->typ_dt_ops-> - mds_postrecov(mdd->mdd_obd_dev); + obd->obd_recovering = 0; + obd->obd_type->typ_dt_ops->o_postrecov(obd); /* TODO: orphans handling */ rc = next->ld_ops->ldo_recovery_complete(ctxt, next); diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 0107b8a..1196a49 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -2157,7 +2157,6 @@ int mds_postrecov(struct obd_device *obd) out: RETURN(rc); } -EXPORT_SYMBOL(mds_postrecov); /* We need to be able to stop an mds_lov_synchronize */ static int mds_lov_early_clean(struct obd_device *obd) @@ -2902,6 +2901,7 @@ static struct obd_ops mds_cmd_obd_ops = { .o_llog_init = mds_llog_init, .o_llog_finish = mds_llog_finish, .o_notify = mds_notify, + .o_postrecov = mds_postrecov, // .o_health_check = mds_cmd_health_check, }; -- 1.8.3.1