Whamcloud - gitweb
LU-6179 llite: Implement ladvise lockahead
[fs/lustre-release.git] / lustre / include / uapi / linux / lustre / lustre_idl.h
index f124baa..597bc36 100644 (file)
@@ -794,13 +794,15 @@ struct ptlrpc_body_v2 {
                                                         RPCs in parallel */
 #define OBD_CONNECT_DIR_STRIPE  0x400000000000000ULL /* striped DNE dir */
 #define OBD_CONNECT_SUBTREE    0x800000000000000ULL /* fileset mount */
-#define OBD_CONNECT_LOCK_AHEAD  0x1000000000000000ULL /* lock ahead */
+#define OBD_CONNECT_LOCKAHEAD_OLD 0x1000000000000000ULL /* Old Cray lockahead */
+
 /** bulk matchbits is sent within ptlrpc_body */
 #define OBD_CONNECT_BULK_MBITS  0x2000000000000000ULL
 #define OBD_CONNECT_OBDOPACK    0x4000000000000000ULL /* compact OUT obdo */
 #define OBD_CONNECT_FLAGS2      0x8000000000000000ULL /* second flags word */
 /* ocd_connect_flags2 flags */
 #define OBD_CONNECT2_FILE_SECCTX       0x1ULL /* set file security context at create */
+#define OBD_CONNECT2_LOCKAHEAD 0x2ULL /* ladvise lockahead v2 */
 
 /* XXX README XXX:
  * Please DO NOT add flag values here before first ensuring that this same
@@ -867,8 +869,9 @@ struct ptlrpc_body_v2 {
                                OBD_CONNECT_LAYOUTLOCK | OBD_CONNECT_FID | \
                                OBD_CONNECT_PINGLESS | OBD_CONNECT_LFSCK | \
                                OBD_CONNECT_BULK_MBITS | \
-                               OBD_CONNECT_GRANT_PARAM)
-#define OST_CONNECT_SUPPORTED2 0
+                               OBD_CONNECT_GRANT_PARAM | OBD_CONNECT_FLAGS2)
+
+#define OST_CONNECT_SUPPORTED2 OBD_CONNECT2_LOCKAHEAD
 
 #define ECHO_CONNECT_SUPPORTED 0
 #define ECHO_CONNECT_SUPPORTED2 0
@@ -2084,7 +2087,7 @@ struct lmv_mds_md_v1 {
 
 #define LMV_HASH_FLAG_MIGRATION        0x80000000
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 10, 53, 0)
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 10, 56, 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
@@ -2291,6 +2294,12 @@ struct ldlm_extent {
         __u64 gid;
 };
 
+static inline bool ldlm_extent_equal(const struct ldlm_extent *ex1,
+                                   const struct ldlm_extent *ex2)
+{
+       return ex1->start == ex2->start && ex1->end == ex2->end;
+}
+
 struct ldlm_inodebits {
         __u64 bits;
        __u64 try_bits; /* optional bits to try */