Whamcloud - gitweb
Branch:b_new_cmd
authorwangdi <wangdi>
Fri, 1 Dec 2006 07:40:45 +0000 (07:40 +0000)
committerwangdi <wangdi>
Fri, 1 Dec 2006 07:40:45 +0000 (07:40 +0000)
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

index cce6d49..0092e75 100644 (file)
@@ -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);
         }