Whamcloud - gitweb
- merge 0.7rc1 from b_devel to HEAD (20030612 merge point)
[fs/lustre-release.git] / lustre / include / linux / obd_lov.h
index 11f3a48..b12a062 100644 (file)
@@ -5,13 +5,41 @@
 #ifndef _OBD_LOV_H__
 #define _OBD_LOV_H__
 
-#ifdef __KERNEL__
-
 #define OBD_LOV_DEVICENAME "lov"
 
-void lov_unpackdesc(struct lov_desc *ld);
-void lov_packdesc(struct lov_desc *ld);
-void lov_packmd(struct lov_mds_md *mdsmd, struct lov_stripe_md *md);
+struct lov_brw_async_args {
+        obd_count        aa_oa_bufs;
+        struct brw_page *aa_ioarr;
+};
+
+struct lov_getattr_async_args {
+        struct lov_stripe_md  *aa_lsm;
+        struct obdo           *aa_oa;
+        struct obdo           *aa_stripe_oas;
+};
+
+static inline int lov_stripe_md_size(int stripes)
+{
+        return sizeof(struct lov_stripe_md) + stripes*sizeof(struct lov_oinfo);
+}
+
+static inline int lov_mds_md_size(int stripes)
+{
+        return sizeof(struct lov_mds_md) + stripes*sizeof(struct lov_object_id);
+}
+
+extern int lov_packmd(struct lustre_handle *conn, struct lov_mds_md **lmm,
+                       struct lov_stripe_md *lsm);
+extern int lov_unpackmd(struct lustre_handle *conn, struct lov_stripe_md **lsm,
+                         struct lov_mds_md *lmm, int lmmsize);
+extern int lov_setstripe(struct lustre_handle *conn,
+                         struct lov_stripe_md **lsmp, struct lov_mds_md *lmmu);
+extern int lov_getstripe(struct lustre_handle *conn, 
+                         struct lov_stripe_md *lsm, struct lov_mds_md *lmmu);
+
+#define IOC_LOV_TYPE                   'g'
+#define IOC_LOV_MIN_NR                 50
+#define IOC_LOV_SET_OSC_ACTIVE         _IOWR('g', 50, long)
+#define IOC_LOV_MAX_NR                 50
 
-#endif
 #endif