Whamcloud - gitweb
LU-819 utils: Fix lfs getstripe -M
[fs/lustre-release.git] / lustre / include / lustre / lustre_user.h
index d371b8d..f2a52cb 100644 (file)
@@ -157,7 +157,7 @@ struct obd_statfs {
 /* see <lustre_lib.h> for ioctl numbers 177-210 */
 
 
-#define LL_STATFS_MDC           1
+#define LL_STATFS_LMV           1
 #define LL_STATFS_LOV           2
 
 #define IOC_MDC_TYPE            'i'
@@ -170,6 +170,9 @@ struct obd_statfs {
 #define LL_IOC_OBD_STATFS       IOC_OBD_STATFS
 #define IOC_MDC_GETSTRIPE       IOC_MDC_GETFILESTRIPE
 
+
+#define MAX_OBD_NAME 128 /* If this changes, a NEW ioctl must be added */
+
 #define O_LOV_DELAY_CREATE 0100000000  /* hopefully this does not conflict */
 
 #define LL_FILE_IGNORE_LOCK     0x00000001
@@ -200,6 +203,7 @@ struct lov_user_ost_data_v1 {     /* per-stripe data structure */
 } __attribute__((packed));
 
 #define lov_user_md lov_user_md_v1
+#define lmm_stripe_offset u.lum_stripe_offset
 struct lov_user_md_v1 {           /* LOV EA user data (host-endian) */
         __u32 lmm_magic;          /* magic number = LOV_USER_MAGIC_V1 */
         __u32 lmm_pattern;        /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
@@ -207,7 +211,12 @@ struct lov_user_md_v1 {           /* LOV EA user data (host-endian) */
         __u64 lmm_object_seq;     /* LOV object seq */
         __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 */
+        union {
+                __u16 lum_stripe_offset;  /* starting stripe offset in
+                                           * lmm_objects, use when writing */
+                __u16 lum_layout_gen;     /* layout generation number
+                                           * used when reading */
+        } u;
         struct lov_user_ost_data_v1 lmm_objects[0]; /* per-stripe data */
 } __attribute__((packed,  __may_alias__));
 
@@ -218,7 +227,12 @@ struct lov_user_md_v3 {           /* LOV EA user data (host-endian) */
         __u64 lmm_object_seq;     /* LOV object seq */
         __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 */
+        union {
+                __u16 lum_stripe_offset;  /* starting stripe offset in
+                                           * lmm_objects, use when writing */
+                __u16 lum_layout_gen;     /* layout generation number
+                                           * used when reading */
+        } u;
         char  lmm_pool_name[LOV_MAXPOOLNAME]; /* pool name */
         struct lov_user_ost_data_v1 lmm_objects[0]; /* per-stripe data */
 } __attribute__((packed));