Whamcloud - gitweb
land 0.5.20.3 b_devel onto HEAD (b_devel will remain)
[fs/lustre-release.git] / lustre / include / linux / obd_lov.h
index 9cfbd85..ff3e689 100644 (file)
@@ -5,22 +5,24 @@
 #ifndef _OBD_LOV_H__
 #define _OBD_LOV_H__
 
-#ifdef __KERNEL__
-
 #define OBD_LOV_DEVICENAME "lov"
 
-struct lov_object_id { /* per-child structure */
-        __u64 l_object_id;
-        __u32 l_device_id;
-};
+void lov_unpackdesc(struct lov_desc *ld);
+void lov_packdesc(struct lov_desc *ld);
 
-struct lov_md {
-        __u64 lmd_object_id;     /* lov object id */
-        __u64 lmd_stripe_count;
-        __u32 lmd_stripe_size;
-        __u32 lmd_stripe_pattern;  /* per-lov object stripe pattern */
-        struct lov_object_id lmd_objects[0];
-};
+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);
+}
+
+#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