Whamcloud - gitweb
LU-13525 sec: better struct sepol_downcall_data
[fs/lustre-release.git] / lustre / include / uapi / linux / lustre / lustre_user.h
index 6e52437..62d5746 100644 (file)
@@ -50,6 +50,7 @@
 #include <linux/types.h>
 #include <linux/unistd.h>
 #include <linux/lustre/lustre_fiemap.h>
+#include <linux/lustre/lustre_ver.h>
 
 #ifndef __KERNEL__
 # define __USE_ISOC99  1
@@ -257,15 +258,15 @@ typedef struct statx lstatx_t;
 #define LUSTRE_FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_DEVICE_ORDER)
 
 enum obd_statfs_state {
-       OS_STATE_DEGRADED       = 0x00000001, /**< RAID degraded/rebuilding */
-       OS_STATE_READONLY       = 0x00000002, /**< filesystem is read-only */
-       OS_STATE_NOPRECREATE    = 0x00000004, /**< no object precreation */
-       OS_STATE_UNUSED1        = 0x00000008, /**< obsolete 1.6, was EROFS=30 */
-       OS_STATE_UNUSED2        = 0x00000010, /**< obsolete 1.6, was EROFS=30 */
-       OS_STATE_ENOSPC         = 0x00000020, /**< not enough free space */
-       OS_STATE_ENOINO         = 0x00000040, /**< not enough inodes */
-       OS_STATE_SUM            = 0x00000100, /**< aggregated for all tagrets */
-       OS_STATE_NONROT         = 0x00000200, /**< non-rotational device */
+       OS_STATFS_DEGRADED      = 0x00000001, /**< RAID degraded/rebuilding */
+       OS_STATFS_READONLY      = 0x00000002, /**< filesystem is read-only */
+       OS_STATFS_NOPRECREATE   = 0x00000004, /**< no object precreation */
+       OS_STATFS_UNUSED1       = 0x00000008, /**< obsolete 1.6, was EROFS=30 */
+       OS_STATFS_UNUSED2       = 0x00000010, /**< obsolete 1.6, was EROFS=30 */
+       OS_STATFS_ENOSPC        = 0x00000020, /**< not enough free space */
+       OS_STATFS_ENOINO        = 0x00000040, /**< not enough inodes */
+       OS_STATFS_SUM           = 0x00000100, /**< aggregated for all tagrets */
+       OS_STATFS_NONROT        = 0x00000200, /**< non-rotational device */
 };
 
 /** filesystem statistics/attributes for target device */
@@ -280,7 +281,7 @@ struct obd_statfs {
        __u32           os_bsize;       /* block size in bytes for os_blocks */
        __u32           os_namelen;     /* maximum length of filename in bytes*/
        __u64           os_maxbytes;    /* maximum object size in bytes */
-       __u32           os_state;       /**< obd_statfs_state OS_STATE_* flag */
+       __u32           os_state;       /**< obd_statfs_state OS_STATFS_* */
        __u32           os_fprecreated; /* objs available now to the caller */
                                        /* used in QoS code to find preferred
                                         * OSTs */
@@ -424,8 +425,9 @@ enum lma_incompat {
                                                 is on the remote MDT */
        LMAI_STRIPED            = 0x00000008, /* striped directory inode */
        LMAI_ORPHAN             = 0x00000010, /* inode is orphan */
+       LMAI_ENCRYPT            = 0x00000020, /* inode is encrypted */
        LMA_INCOMPAT_SUPP       = (LMAI_AGENT | LMAI_REMOTE_PARENT | \
-                                  LMAI_STRIPED | LMAI_ORPHAN)
+                                  LMAI_STRIPED | LMAI_ORPHAN | LMAI_ENCRYPT)
 };
 
 
@@ -647,8 +649,6 @@ struct fsxattr {
 #define FS_IOC_FSGETXATTR              _IOR('X', 31, struct fsxattr)
 #define FS_IOC_FSSETXATTR              _IOW('X', 32, struct fsxattr)
 #endif
-#define LL_IOC_FSGETXATTR              FS_IOC_FSGETXATTR
-#define LL_IOC_FSSETXATTR              FS_IOC_FSSETXATTR
 #ifndef FS_XFLAG_PROJINHERIT
 #define FS_XFLAG_PROJINHERIT           0x00000200
 #endif
@@ -1289,7 +1289,6 @@ static inline const char *qtype_name(int qtype)
 }
 
 #define IDENTITY_DOWNCALL_MAGIC 0x6d6dd629
-#define SEPOL_DOWNCALL_MAGIC 0x8b8bb842
 
 /* permission */
 #define N_PERMS_MAX      64
@@ -1311,12 +1310,25 @@ struct identity_downcall_data {
        __u32                            idd_groups[0];
 };
 
-struct sepol_downcall_data {
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 16, 53, 0)
+/* old interface struct is deprecated in 2.14 */
+#define SEPOL_DOWNCALL_MAGIC_OLD 0x8b8bb842
+struct sepol_downcall_data_old {
        __u32           sdd_magic;
        __s64           sdd_sepol_mtime;
        __u16           sdd_sepol_len;
        char            sdd_sepol[0];
 };
+#endif
+
+#define SEPOL_DOWNCALL_MAGIC 0x8b8bb843
+struct sepol_downcall_data {
+       __u32           sdd_magic;
+       __u16           sdd_sepol_len;
+       __u16           sdd_padding1;
+       __s64           sdd_sepol_mtime;
+       char            sdd_sepol[0];
+};
 
 #ifdef NEED_QUOTA_DEFS
 #ifndef QIF_BLIMITS
@@ -2434,31 +2446,6 @@ struct hsm_copy {
        struct hsm_action_item  hc_hai;
 };
 
-/* JSON objects */
-enum llapi_json_types {
-       LLAPI_JSON_INTEGER = 1,
-       LLAPI_JSON_BIGNUM,
-       LLAPI_JSON_REAL,
-       LLAPI_JSON_STRING
-};
-
-struct llapi_json_item {
-       char                    *lji_key;
-       __u32                   lji_type;
-       union {
-               int     lji_integer;
-               __u64   lji_u64;
-               double  lji_real;
-               char    *lji_string;
-       };
-       struct llapi_json_item  *lji_next;
-};
-
-struct llapi_json_item_list {
-       int                     ljil_item_count;
-       struct llapi_json_item  *ljil_items;
-};
-
 enum lu_ladvise_type {
        LU_LADVISE_INVALID      = 0,
        LU_LADVISE_WILLREAD     = 1,