Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / cmm / mdc_device.c
index 9c259aa..8c75a6c 100644 (file)
@@ -16,8 +16,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
  *
  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  * CA 95054 USA or visit www.sun.com if you need additional information or
@@ -52,7 +52,7 @@
 #include "cmm_internal.h"
 #include "mdc_internal.h"
 
-static struct lu_device_operations mdc_lu_ops;
+static const struct lu_device_operations mdc_lu_ops;
 
 static inline int lu_device_is_mdc(struct lu_device *ld)
 {
@@ -60,7 +60,7 @@ static inline int lu_device_is_mdc(struct lu_device *ld)
                     ld->ld_ops == &mdc_lu_ops);
 }
 
-static struct md_device_operations mdc_md_ops = { 0 };
+static const struct md_device_operations mdc_md_ops = { 0 };
 
 static int mdc_obd_update(struct obd_device *host,
                           struct obd_device *watched,
@@ -104,7 +104,7 @@ static int mdc_obd_add(const struct lu_env *env,
         const char *uuid_str = lustre_cfg_string(cfg, 1);
         const char *index = lustre_cfg_string(cfg, 2);
         const char *mdc_uuid_str = lustre_cfg_string(cfg, 4);
-        struct lu_site *ls = mdc2lu_dev(mc)->ld_site;
+        struct md_site *ms = lu_site2md(mdc2lu_dev(mc)->ld_site);
         char *p;
         int rc = 0;
 
@@ -162,7 +162,7 @@ static int mdc_obd_add(const struct lu_env *env,
                         desc->cl_exp = class_conn2export(conn);
                         /* set seq controller export for MDC0 if exists */
                         if (mc->mc_num == 0)
-                                ls->ls_control_exp = 
+                                ms->ms_control_exp =
                                         class_export_get(desc->cl_exp);
                         rc = obd_fid_init(desc->cl_exp);
                         if (rc)
@@ -245,7 +245,7 @@ static int mdc_process_config(const struct lu_env *env,
         RETURN(rc);
 }
 
-static struct lu_device_operations mdc_lu_ops = {
+static const struct lu_device_operations mdc_lu_ops = {
        .ldo_object_alloc   = mdc_object_alloc,
         .ldo_process_config = mdc_process_config
 };
@@ -321,6 +321,9 @@ static struct lu_device_type_operations mdc_device_type_ops = {
         .ldto_init = mdc_type_init,
         .ldto_fini = mdc_type_fini,
 
+        .ldto_start = mdc_type_start,
+        .ldto_stop  = mdc_type_stop,
+
         .ldto_device_alloc = mdc_device_alloc,
         .ldto_device_free  = mdc_device_free,