Whamcloud - gitweb
- use OSD to maintain lovobjids files
authoralex <alex>
Tue, 29 Sep 2009 12:42:07 +0000 (12:42 +0000)
committeralex <alex>
Tue, 29 Sep 2009 12:42:07 +0000 (12:42 +0000)
lustre/include/lustre_mds.h
lustre/include/obd.h
lustre/mdd/mdd_device.c
lustre/mdd/mdd_internal.h

index b0b9a6a..029beaa 100644 (file)
@@ -71,7 +71,9 @@ struct mds_capa_info {
 };
 
 /* mds/mds_lov.c */
-int mds_lov_write_objids(struct obd_device *obd);
+int mds_lov_write_objids(const struct lu_env *env,
+                         struct obd_device *obd,
+                         struct thandle *th);
 int mds_lov_prepare_objids(struct obd_device *obd, struct lov_mds_md *lmm);
 void mds_lov_update_objids(struct obd_device *obd, struct lov_mds_md *lmm);
 int mds_log_op_unlink(struct obd_device *, struct lov_mds_md *, int,
index 36b6293..0c3b0d1 100644 (file)
@@ -530,6 +530,9 @@ struct mgs_obd {
         cfs_proc_dir_entry_t            *mgs_proc_live;
 };
 
+struct dt_object;
+struct dt_device;
+
 struct mds_obd {
         /* NB this field MUST be first */
         struct obd_device_target         mds_obt;
@@ -583,6 +586,9 @@ struct mds_obd {
         /* for capability keys update */
         struct lustre_capa_key          *mds_capa_keys;
         struct rw_semaphore              mds_notify_lock;
+
+        struct dt_object                *mds_lov_objid_dt;
+        struct dt_device                *mds_next_dev;
 };
 
 #define mds_transno_lock         mds_obt.obt_translock
index 6680b0b..f44ae2f 100644 (file)
@@ -190,7 +190,7 @@ static int mdd_changelog_llog_init(struct mdd_device *mdd)
         /* Find last changelog entry number */
         ctxt = llog_get_context(obd, LLOG_CHANGELOG_ORIG_CTXT);
         if (ctxt == NULL) {
-                CERROR("no changelog context\n");
+                //CERROR("no changelog context\n");
                 return -EINVAL;
         }
         if (!ctxt->loc_handle) {
@@ -250,7 +250,7 @@ static int mdd_changelog_init(const struct lu_env *env, struct mdd_device *mdd)
 
         rc = mdd_changelog_llog_init(mdd);
         if (rc) {
-                CERROR("Changelog setup during init failed %d\n", rc);
+                //CERROR("Changelog setup during init failed %d\n", rc);
                 mdd->mdd_cl.mc_flags |= CLM_ERR;
         }
 
@@ -1058,6 +1058,8 @@ static int mdd_recovery_complete(const struct lu_env *env,
         RETURN(rc);
 }
 
+int mds_lov_init(struct obd_device *obd);
+
 static int mdd_prepare(const struct lu_env *env,
                        struct lu_device *pdev,
                        struct lu_device *cdev)
@@ -1091,6 +1093,7 @@ static int mdd_prepare(const struct lu_env *env,
                 GOTO(out, rc);
         }
 
+        rc = mds_lov_init(mdd2obd_dev(mdd));
 out:
         RETURN(rc);
 }
index d9f872b..251547e 100644 (file)
@@ -133,6 +133,7 @@ struct mdd_device {
         struct mdd_object               *mdd_dot_lustre;
         struct mdd_dot_lustre_objs       mdd_dot_lustre_objs;
         unsigned int                     mdd_sync_permission;
+        struct dt_object                *mdd_objid;
 };
 
 enum mod_flags {