@@ -156,7 +156,9 @@ static inline u64 *exp_connect_flags2_ptr(struct obd_export *exp)
static inline u64 exp_connect_flags2(struct obd_export *exp)
{
- return *exp_connect_flags2_ptr(exp);
+ if (exp_connect_flags(exp) & OBD_CONNECT_FLAGS2)
+ return *exp_connect_flags2_ptr(exp);
+ return 0;
}
static inline int exp_max_brw_size(struct obd_export *exp)
@@ -262,6 +264,11 @@ static inline int exp_connect_lockahead(struct obd_export *exp)
return !!(exp_connect_flags2(exp) & OBD_CONNECT2_LOCKAHEAD);
}
+static inline int exp_connect_flr(struct obd_export *exp)
+{
+ return !!(exp_connect_flags2(exp) & OBD_CONNECT2_FLR);
+}
+
struct obd_export *class_conn2export(struct lustre_handle *conn);
#define KKUC_CT_DATA_MAGIC 0x092013cea
@@ -208,7 +208,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)
OBD_CONNECT_GRANT_PARAM |
OBD_CONNECT_SHORTIO | OBD_CONNECT_FLAGS2;
- data->ocd_connect_flags2 = 0;
+ data->ocd_connect_flags2 = OBD_CONNECT2_FLR;
if (sbi->ll_flags & LL_SBI_LRU_RESIZE)
data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
@@ -791,6 +791,7 @@ struct ptlrpc_body_v2 {
#define OBD_CONNECT2_LOCKAHEAD 0x2ULL /* ladvise lockahead
* v2
*/
+#define OBD_CONNECT2_FLR 0x20ULL /* FLR support */
/* XXX README XXX:
* Please DO NOT add flag values here before first ensuring that this same