#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
#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 */
__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 */
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)
};
#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
#define LL_FILE_GROUP_LOCKED 0x00000002
#define LL_FILE_READAHEA 0x00000004
#define LL_FILE_LOCKED_DIRECTIO 0x00000008 /* client-side locks with dio */
-#define LL_FILE_LOCKLESS_IO 0x00000010 /* server-side locks with cio */
#define LL_FILE_FLOCK_WARNING 0x00000020 /* warned about disabled flock */
#define LOV_USER_MAGIC_V1 0x0BD10BD0
}
#define IDENTITY_DOWNCALL_MAGIC 0x6d6dd629
-#define SEPOL_DOWNCALL_MAGIC 0x8b8bb842
/* permission */
#define N_PERMS_MAX 64
__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
/* XXX: same as if_dqblk struct in kernel, plus one padding */
struct obd_dqblk {
- __u64 dqb_bhardlimit;
- __u64 dqb_bsoftlimit;
- __u64 dqb_curspace;
+ __u64 dqb_bhardlimit; /* kbytes unit */
+ __u64 dqb_bsoftlimit; /* kbytes unit */
+ __u64 dqb_curspace; /* bytes unit */
__u64 dqb_ihardlimit;
__u64 dqb_isoftlimit;
__u64 dqb_curinodes;
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,