+struct lov_user_md_v3 { /* LOV EA user data (host-endian) */
+ __u32 lmm_magic; /* magic number = LOV_USER_MAGIC_V3 */
+ __u32 lmm_pattern; /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
+ __u64 lmm_object_id; /* LOV object ID */
+ __u64 lmm_object_gr; /* LOV object group */
+ __u32 lmm_stripe_size; /* size of stripe in bytes */
+ __u16 lmm_stripe_count; /* num stripes in use for this object */
+ __u16 lmm_stripe_offset; /* starting stripe offset in lmm_objects */
+ char lmm_pool_name[LOV_MAXPOOLNAME]; /* pool name */
+ struct lov_user_ost_data_v1 lmm_objects[0]; /* per-stripe data */
+} __attribute__((packed));
+
+#define copy_lov_mds2user(user_md, mds_md) do { \
+ memcpy(user_md, mds_md, sizeof(*(user_md))); \
+ (user_md)->lmm_stripe_offset = 0; \
+ (user_md)->lmm_stripe_count = (mds_md)->lmm_stripe_count; } while(0)
+