From a0d7d23362d17c8e0a9504bb147474e1739629d2 Mon Sep 17 00:00:00 2001 From: wangdi Date: Fri, 1 Dec 2006 07:40:45 +0000 Subject: [PATCH] Branch:b_new_cmd Init cat log for mds when add ost in recoverying, to make sure all unlink log can be initialized after config log is processed. This could avoid race beween unlink and llog init postrecovery, which should be the reason of b11218. b:11218 --- lustre/mds/mds_lov.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lustre/mds/mds_lov.c b/lustre/mds/mds_lov.c index cce6d49..0092e75 100644 --- a/lustre/mds/mds_lov.c +++ b/lustre/mds/mds_lov.c @@ -842,6 +842,15 @@ int mds_notify(struct obd_device *obd, struct obd_device *watched, after the mdt in the config log. They didn't make it into mds_lov_connect. */ rc = mds_lov_update_desc(obd, obd->u.mds.mds_osc_exp); + if (rc) + RETURN(rc); + /* We should update init llog here too for replay unlink and + * possiable llog init race when recovery complete */ + mutex_down(&obd->obd_dev_sem); + llog_cat_initialize(obd, NULL, + obd->u.mds.mds_lov_desc.ld_tgt_count, + &watched->u.cli.cl_target_uuid); + mutex_up(&obd->obd_dev_sem); RETURN(rc); } -- 1.8.3.1