Whamcloud - gitweb
LU-80 lov: large stripe count support
[fs/lustre-release.git] / lustre / mdd / mdd_lov.c
index 4d2fed6..69df68e 100644 (file)
@@ -28,6 +28,9 @@
 /*
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2011 Whamcloud, Inc.
+ *
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -149,6 +152,9 @@ int mdd_init_obd(const struct lu_env *env, struct mdd_device *mdd,
         obd->obd_recovering = 1;
         cfs_spin_unlock(&obd->obd_dev_lock);
         obd->u.mds.mds_id = mds_id;
+        obd->u.obt.obt_osd_properties.osd_max_ea_size =
+                                               mdd->mdd_dt_conf.ddp_max_ea_size;
+
         rc = class_setup(obd, lcfg);
         if (rc)
                 GOTO(class_detach, rc);
@@ -160,6 +166,7 @@ int mdd_init_obd(const struct lu_env *env, struct mdd_device *mdd,
         obd->obd_upcall.onu_upcall = mdd_notify;
         obd->obd_upcall.onu_owner = mdd;
         mdd->mdd_obd_dev = obd;
+
         EXIT;
 class_detach:
         if (rc)
@@ -373,7 +380,7 @@ void mdd_lov_create_finish(const struct lu_env *env, struct mdd_device *mdd,
                            const struct md_op_spec *spec)
 {
         if (lmm && !spec->no_create)
-                OBD_FREE(lmm, lmm_size);
+                OBD_FREE_LARGE(lmm, lmm_size);
 }
 
 int mdd_lov_create(const struct lu_env *env, struct mdd_device *mdd,