Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / include / obd_class.h
index 5913c1e..8a73f27 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
@@ -399,7 +399,8 @@ static inline int class_devno_max(void)
 }
 
 static inline int obd_get_info(struct obd_export *exp, __u32 keylen,
-                               void *key, __u32 *vallen, void *val)
+                               void *key, __u32 *vallen, void *val,
+                               struct lov_stripe_md *lsm)
 {
         int rc;
         ENTRY;
@@ -407,7 +408,7 @@ static inline int obd_get_info(struct obd_export *exp, __u32 keylen,
         EXP_CHECK_DT_OP(exp, get_info);
         EXP_COUNTER_INCREMENT(exp, get_info);
 
-        rc = OBP(exp->exp_obd, get_info)(exp, keylen, key, vallen, val);
+        rc = OBP(exp->exp_obd, get_info)(exp, keylen, key, vallen, val, lsm);
         RETURN(rc);
 }
 
@@ -809,6 +810,18 @@ static inline int obd_del_conn(struct obd_import *imp, struct obd_uuid *uuid)
         RETURN(rc);
 }
 
+static inline struct obd_uuid *obd_get_uuid(struct obd_export *exp)
+{
+        struct obd_uuid *uuid;
+        ENTRY;
+
+        OBD_CHECK_DT_OP(exp->exp_obd, get_uuid, NULL);
+        EXP_COUNTER_INCREMENT(exp, get_uuid);
+
+        uuid = OBP(exp->exp_obd, get_uuid)(exp);
+        RETURN(uuid);
+}
+
 static inline int obd_connect(const struct lu_env *env,
                               struct lustre_handle *conn,struct obd_device *obd,
                               struct obd_uuid *cluuid,
@@ -1019,6 +1032,7 @@ static inline int obd_statfs_async(struct obd_device *obd,
                 spin_lock(&obd->obd_osfs_lock);
                 memcpy(oinfo->oi_osfs, &obd->obd_osfs, sizeof(*oinfo->oi_osfs));
                 spin_unlock(&obd->obd_osfs_lock);
+                oinfo->oi_flags |= OBD_STATFS_FROM_CACHE;
                 if (oinfo->oi_cb_up)
                         oinfo->oi_cb_up(oinfo, 0);
         }
@@ -1841,7 +1855,7 @@ static inline int md_close(struct obd_export *exp, struct md_op_data *op_data,
 
 static inline int md_create(struct obd_export *exp, struct md_op_data *op_data,
                             const void *data, int datalen, int mode, __u32 uid,
-                            __u32 gid, __u32 cap_effective, __u64 rdev,
+                            __u32 gid, cfs_cap_t cap_effective, __u64 rdev,
                             struct ptlrpc_request **request)
 {
         int rc;
@@ -1871,6 +1885,7 @@ static inline int md_enqueue(struct obd_export *exp,
                              struct md_op_data *op_data,
                              struct lustre_handle *lockh,
                              void *lmm, int lmmsize,
+                             struct ptlrpc_request **req,
                              int extra_lock_flags)
 {
         int rc;
@@ -1878,7 +1893,7 @@ static inline int md_enqueue(struct obd_export *exp,
         EXP_CHECK_MD_OP(exp, enqueue);
         EXP_MD_COUNTER_INCREMENT(exp, enqueue);
         rc = MDP(exp->exp_obd, enqueue)(exp, einfo, it, op_data, lockh,
-                                        lmm, lmmsize, extra_lock_flags);
+                                        lmm, lmmsize, req, extra_lock_flags);
         RETURN(rc);
 }