Whamcloud - gitweb
LU-9846 obd: Add overstriping CONNECT flag
[fs/lustre-release.git] / lustre / include / uapi / linux / lustre / lustre_idl.h
index 069fe56..73b5cd2 100644 (file)
@@ -829,10 +829,15 @@ struct ptlrpc_body_v2 {
 #define OBD_CONNECT2_LOCKAHEAD          0x2ULL /* ladvise lockahead v2 */
 #define OBD_CONNECT2_DIR_MIGRATE        0x4ULL /* migrate striped dir */
 #define OBD_CONNECT2_SUM_STATFS                0x8ULL /* MDT return aggregated stats */
+#define OBD_CONNECT2_OVERSTRIPING      0x10ULL /* OST overstriping support */
 #define OBD_CONNECT2_FLR               0x20ULL /* FLR support */
 #define OBD_CONNECT2_WBC_INTENTS       0x40ULL /* create/unlink/... intents for wbc, also operations under client-held parent locks */
 #define OBD_CONNECT2_LOCK_CONVERT      0x80ULL /* IBITS lock convert support */
 #define OBD_CONNECT2_ARCHIVE_ID_ARRAY  0x100ULL /* store HSM archive_id in array */
+#define OBD_CONNECT2_SELINUX_POLICY    0x400ULL /* has client SELinux policy */
+#define OBD_CONNECT2_LSOM              0x800ULL /* LSOM support */
+#define OBD_CONNECT2_PCC               0x1000ULL /* Persistent Client Cache */
+#define OBD_CONNECT2_PLAIN_LAYOUT      0x2000ULL /* Plain Directory Layout */
 
 /* XXX README XXX:
  * Please DO NOT add flag values here before first ensuring that this same
@@ -883,11 +888,14 @@ struct ptlrpc_body_v2 {
                                OBD_CONNECT_GRANT_PARAM | \
                                OBD_CONNECT_SHORTIO | OBD_CONNECT_FLAGS2)
 
-#define MDT_CONNECT_SUPPORTED2 (OBD_CONNECT2_FILE_SECCTX | OBD_CONNECT2_FLR | \
-                                OBD_CONNECT2_SUM_STATFS | \
-                               OBD_CONNECT2_LOCK_CONVERT | \
+#define MDT_CONNECT_SUPPORTED2 (OBD_CONNECT2_FILE_SECCTX | \
                                OBD_CONNECT2_DIR_MIGRATE | \
-                               OBD_CONNECT2_ARCHIVE_ID_ARRAY)
+                               OBD_CONNECT2_SUM_STATFS | \
+                               OBD_CONNECT2_FLR |\
+                               OBD_CONNECT2_LOCK_CONVERT | \
+                               OBD_CONNECT2_ARCHIVE_ID_ARRAY | \
+                               OBD_CONNECT2_SELINUX_POLICY | \
+                               OBD_CONNECT2_LSOM)
 
 #define OST_CONNECT_SUPPORTED  (OBD_CONNECT_SRVLOCK | OBD_CONNECT_GRANT | \
                                OBD_CONNECT_REQPORTAL | OBD_CONNECT_VERSION | \
@@ -1081,6 +1089,9 @@ enum obdo_flags {
                              OBD_FL_CKSUM_CRC32C | OBD_FL_CKSUM_T10IP512 |
                              OBD_FL_CKSUM_T10IP4K | OBD_FL_CKSUM_T10CRC512 |
                              OBD_FL_CKSUM_T10CRC4K,
+
+       OBD_FL_NO_QUOTA_ALL = OBD_FL_NO_USRQUOTA | OBD_FL_NO_GRPQUOTA |
+                             OBD_FL_NO_PRJQUOTA,
 };
 
 /*
@@ -1290,6 +1301,7 @@ lov_mds_md_max_stripe_count(size_t buf_size, __u32 lmm_magic)
 #define OBD_MD_DEFAULT_MEA   (0x0040000000000000ULL) /* default MEA */
 #define OBD_MD_FLOSTLAYOUT   (0x0080000000000000ULL) /* contain ost_layout */
 #define OBD_MD_FLPROJID      (0x0100000000000000ULL) /* project ID */
+#define OBD_MD_SECCTX        (0x0200000000000000ULL) /* embed security xattr */
 
 #define OBD_MD_FLALLQUOTA (OBD_MD_FLUSRQUOTA | \
                           OBD_MD_FLGRPQUOTA | \
@@ -1716,17 +1728,17 @@ enum {
 enum {
        /* these should be identical to their EXT4_*_FL counterparts, they are
         * redefined here only to avoid dragging in fs/ext4/ext4.h */
-       LUSTRE_SYNC_FL = 0x00000008, /* Synchronous updates */
-       LUSTRE_IMMUTABLE_FL = 0x00000010, /* Immutable file */
-       LUSTRE_APPEND_FL = 0x00000020, /* writes to file may only append */
-       LUSTRE_NODUMP_FL = 0x00000040, /* do not dump file */
-       LUSTRE_NOATIME_FL = 0x00000080, /* do not update atime */
-       LUSTRE_INDEX_FL = 0x00001000, /* hash-indexed directory */
-       LUSTRE_DIRSYNC_FL = 0x00010000, /* dirsync behaviour (dir only) */
-       LUSTRE_TOPDIR_FL = 0x00020000, /* Top of directory hierarchies*/
-       LUSTRE_DIRECTIO_FL = 0x00100000, /* Use direct i/o */
-       LUSTRE_INLINE_DATA_FL = 0x10000000, /* Inode has inline data. */
-       LUSTRE_PROJINHERIT_FL = 0x20000000, /* Create with parents projid */
+       LUSTRE_SYNC_FL          = 0x00000008, /* Synchronous updates */
+       LUSTRE_IMMUTABLE_FL     = 0x00000010, /* Immutable file */
+       LUSTRE_APPEND_FL        = 0x00000020, /* file writes may only append */
+       LUSTRE_NODUMP_FL        = 0x00000040, /* do not dump file */
+       LUSTRE_NOATIME_FL       = 0x00000080, /* do not update atime */
+       LUSTRE_INDEX_FL         = 0x00001000, /* hash-indexed directory */
+       LUSTRE_DIRSYNC_FL       = 0x00010000, /* dirsync behaviour (dir only) */
+       LUSTRE_TOPDIR_FL        = 0x00020000, /* Top of directory hierarchies*/
+       LUSTRE_DIRECTIO_FL      = 0x00100000, /* Use direct i/o */
+       LUSTRE_INLINE_DATA_FL   = 0x10000000, /* Inode has inline data. */
+       LUSTRE_PROJINHERIT_FL   = 0x20000000, /* Create with parents projid */
 
        /* These flags will not be identical to any EXT4_*_FL counterparts,
         * and only reserved for lustre purpose. Note: these flags might
@@ -1735,10 +1747,10 @@ enum {
         * wired by la_flags see osd_attr_get().
         * 2. If these flags needs to be stored into inode, they will be
         * stored in LMA. see LMAI_XXXX */
-       LUSTRE_ORPHAN_FL = 0x00002000,
-       LUSTRE_SET_SYNC_FL = 0x00040000, /* Synchronous setattr on OSTs */
+       LUSTRE_ORPHAN_FL        = 0x00002000,
+       LUSTRE_SET_SYNC_FL      = 0x00040000, /* Synchronous setattr on OSTs */
 
-       LUSTRE_LMA_FL_MASKS = LUSTRE_ORPHAN_FL,
+       LUSTRE_LMA_FL_MASKS     = LUSTRE_ORPHAN_FL,
 };
 
 #ifndef FS_XFLAG_SYNC
@@ -2203,7 +2215,7 @@ struct lmv_mds_md_v1 {
 
 #define LMV_HASH_FLAG_MIGRATION        0x80000000
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 12, 53, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 12, 55, 0)
 /* Since lustre 2.8, this flag will not be needed, instead this DEAD
  * and orphan flags will be stored in LMA (see LMAI_ORPHAN)
  * Keep this flag just for LFSCK, because it still might meet such
@@ -2915,6 +2927,11 @@ enum llog_flag {
                          LLOG_F_EXT_X_OMODE | LLOG_F_EXT_X_XATTR,
 };
 
+/* means first record of catalog */
+enum {
+       LLOG_CAT_FIRST = -1,
+};
+
 /* On-disk header structure of each log object, stored in little endian order */
 #define LLOG_MIN_CHUNK_SIZE    8192
 #define LLOG_HEADER_SIZE        (96) /* sizeof (llog_log_hdr) + sizeof(llh_tail)
@@ -3573,6 +3590,19 @@ struct llog_update_record {
        */
 };
 
+/* sepol string format is:
+ * <1-digit for SELinux status>:<policy name>:<policy version>:<policy hash>
+ */
+/* Max length of the sepol string
+ * Should be large enough to contain a sha512sum of the policy
+ */
+#define SELINUX_MODE_LEN 1
+#define SELINUX_POLICY_VER_LEN 3 /* 3 chars to leave room for the future */
+#define SELINUX_POLICY_HASH_LEN 64
+#define LUSTRE_NODEMAP_SEPOL_LENGTH (SELINUX_MODE_LEN + NAME_MAX + \
+                                    SELINUX_POLICY_VER_LEN + \
+                                    SELINUX_POLICY_HASH_LEN + 3)
+
 /* nodemap records, uses 32 byte record length */
 #define LUSTRE_NODEMAP_NAME_LENGTH 16
 struct nodemap_cluster_rec {