Whamcloud - gitweb
LU-6179 llite: Implement ladvise lockahead
[fs/lustre-release.git] / lustre / include / lustre_export.h
index 1c2e347..ac05be7 100644 (file)
@@ -318,6 +318,16 @@ static inline __u64 exp_connect_flags(struct obd_export *exp)
        return *exp_connect_flags_ptr(exp);
 }
 
+static inline __u64 *exp_connect_flags2_ptr(struct obd_export *exp)
+{
+       return &exp->exp_connect_data.ocd_connect_flags2;
+}
+
+static inline __u64 exp_connect_flags2(struct obd_export *exp)
+{
+       return *exp_connect_flags2_ptr(exp);
+}
+
 static inline int exp_max_brw_size(struct obd_export *exp)
 {
        LASSERT(exp != NULL);
@@ -420,6 +430,16 @@ static inline int exp_connect_large_acl(struct obd_export *exp)
        return !!(exp_connect_flags(exp) & OBD_CONNECT_LARGE_ACL);
 }
 
+static inline int exp_connect_lockahead_old(struct obd_export *exp)
+{
+       return !!(exp_connect_flags(exp) & OBD_CONNECT_LOCKAHEAD_OLD);
+}
+
+static inline int exp_connect_lockahead(struct obd_export *exp)
+{
+       return !!(exp_connect_flags2(exp) & OBD_CONNECT2_LOCKAHEAD);
+}
+
 extern struct obd_export *class_conn2export(struct lustre_handle *conn);
 extern struct obd_device *class_conn2obd(struct lustre_handle *conn);