Whamcloud - gitweb
LU-11367 som: integrate LSOM with lfs find
[fs/lustre-release.git] / lustre / include / uapi / linux / lustre / lustre_user.h
index a99aaa2..7b99c49 100644 (file)
@@ -477,6 +477,8 @@ struct ll_ioc_lease_id {
 #define LL_IOC_FID2MDTIDX              _IOWR('f', 248, struct lu_fid)
 #define LL_IOC_GETPARENT               _IOWR('f', 249, struct getparent)
 #define LL_IOC_LADVISE                 _IOR('f', 250, struct llapi_lu_ladvise)
+#define LL_IOC_HEAT_GET                        _IOWR('f', 251, struct lu_heat)
+#define LL_IOC_HEAT_SET                        _IOW('f', 252, long)
 
 #ifndef        FS_IOC_FSGETXATTR
 /*
@@ -503,11 +505,13 @@ struct fsxattr {
 #define LL_STATFS_LOV          2
 #define LL_STATFS_NODELAY      4
 
-#define IOC_MDC_TYPE            'i'
-#define IOC_MDC_LOOKUP          _IOWR(IOC_MDC_TYPE, 20, struct obd_device *)
-#define IOC_MDC_GETFILESTRIPE   _IOWR(IOC_MDC_TYPE, 21, struct lov_user_md *)
-#define IOC_MDC_GETFILEINFO     _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data *)
-#define LL_IOC_MDC_GETINFO      _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data *)
+#define IOC_MDC_TYPE           'i'
+#define IOC_MDC_LOOKUP         _IOWR(IOC_MDC_TYPE, 20, struct obd_device *)
+#define IOC_MDC_GETFILESTRIPE  _IOWR(IOC_MDC_TYPE, 21, struct lov_user_md *)
+#define IOC_MDC_GETFILEINFO_OLD        _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data_v1 *)
+#define IOC_MDC_GETFILEINFO    _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data)
+#define LL_IOC_MDC_GETINFO_OLD _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data_v1 *)
+#define LL_IOC_MDC_GETINFO     _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data)
 
 #define MAX_OBD_NAME 128 /* If this changes, a NEW ioctl must be added */
 
@@ -554,6 +558,8 @@ struct fsxattr {
 #define LOV_PATTERN_F_RELEASED 0x80000000 /* HSM released file */
 #define LOV_PATTERN_DEFAULT    0xffffffff
 
+#define LOV_OFFSET_DEFAULT      ((__u16)-1)
+
 static inline bool lov_pattern_supported(__u32 pattern)
 {
        return (pattern & ~LOV_PATTERN_F_RELEASED) == LOV_PATTERN_RAID0 ||
@@ -753,11 +759,17 @@ static inline __u32 lov_user_md_size(__u16 stripes, __u32 lmm_magic)
  * use this.  It is unsafe to #define those values in this header as it
  * is possible the application has already #included <sys/stat.h>. */
 #ifdef HAVE_LOV_USER_MDS_DATA
-#define lov_user_mds_data lov_user_mds_data_v1
+#define lov_user_mds_data lov_user_mds_data_v2
 struct lov_user_mds_data_v1 {
        lstat_t lmd_st;                 /* MDS stat struct */
        struct lov_user_md_v1 lmd_lmm;  /* LOV EA V1 user data */
 } __attribute__((packed));
+
+struct lov_user_mds_data_v2 {
+       lstat_t lmd_st;                 /* MDS stat struct */
+       __u64 lmd_flags;                /* MDS stat flags */
+       struct lov_user_md_v1 lmd_lmm;  /* LOV EA V1 user data */
+} __attribute__((packed));
 #endif
 
 struct lmv_user_mds_data {
@@ -2186,6 +2198,36 @@ enum lockahead_results {
        LLA_RESULT_SAME,
 };
 
+enum lu_heat_flag_bit {
+       LU_HEAT_FLAG_BIT_INVALID = 0,
+       LU_HEAT_FLAG_BIT_OFF,
+       LU_HEAT_FLAG_BIT_CLEAR,
+};
+
+#define LU_HEAT_FLAG_CLEAR     (1 << LU_HEAT_FLAG_BIT_CLEAR)
+#define LU_HEAT_FLAG_OFF       (1 << LU_HEAT_FLAG_BIT_OFF)
+
+enum obd_heat_type {
+       OBD_HEAT_READSAMPLE     = 0,
+       OBD_HEAT_WRITESAMPLE    = 1,
+       OBD_HEAT_READBYTE       = 2,
+       OBD_HEAT_WRITEBYTE      = 3,
+       OBD_HEAT_COUNT
+};
+
+#define LU_HEAT_NAMES {                                        \
+       [OBD_HEAT_READSAMPLE]   = "readsample",         \
+       [OBD_HEAT_WRITESAMPLE]  = "writesample",        \
+       [OBD_HEAT_READBYTE]     = "readbyte",           \
+       [OBD_HEAT_WRITEBYTE]    = "writebyte",          \
+}
+
+struct lu_heat {
+       __u32 lh_count;
+       __u32 lh_flags;
+       __u64 lh_heat[0];
+};
+
 #if defined(__cplusplus)
 }
 #endif