* ignored for ldiskfs servers
*/
#define OBD_CONNECT2_UNALIGNED_DIO 0x400000000ULL /* unaligned DIO */
+#define OBD_CONNECT2_CONN_POLICY 0x800000000ULL /* server-side connection policy */
/* XXX README XXX README XXX README XXX README XXX README XXX README XXX
* Please DO NOT add OBD_CONNECT flags before first ensuring that this value
* is not in use by some other branch/patch. Email adilger@whamcloud.com
* may result in out-of-bound memory access and kernel oops.
*/
__u16 ocd_maxmodrpcs; /* Maximum modify RPCs in parallel */
- __u16 padding0; /* READ BELOW! also fix lustre_swab_connect */
+ __u8 ocd_conn_policy; /* bitmask for client/server to communicate about policy */
+ __u8 padding0; /* READ BELOW! also fix lustre_swab_connect */
__u32 padding1; /* READ BELOW! also fix lustre_swab_connect */
__u64 ocd_connect_flags2;/* OBD_CONNECT2_* per above */
__u64 ocd_compr_type; /* bitmask of supported compression types */
#define OBD_CKSUM_T10_TOP OBD_CKSUM_ADLER
/*
+ * Explicitly define the meaning of the bits in ocd_conn_policy,
+ * for server-side connection policy.
+ */
+enum conn_policy_flags {
+ BYPASS_SOFT_BLOCK = 0,
+ CONN_POLICY_FLAGS_NUM = 8,
+};
+
+/*
* OST requests: OBDO & OBD request records
*/
"large_nid", /* 0x100000000 */
"compressed_file", /* 0x200000000 */
"unaligned_dio", /* 0x400000000 */
+ "conn_policy", /* 0x800000000 */
NULL
};
(long long)(int)offsetof(struct obd_connect_data, ocd_maxmodrpcs));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_maxmodrpcs) == 2, "found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_maxmodrpcs));
- LASSERTF((int)offsetof(struct obd_connect_data, padding0) == 74, "found %lld\n",
+ LASSERTF((int)offsetof(struct obd_connect_data, ocd_conn_policy) == 74, "found %lld\n",
+ (long long)(int)offsetof(struct obd_connect_data, ocd_conn_policy));
+ LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_conn_policy) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_conn_policy));
+ LASSERTF((int)offsetof(struct obd_connect_data, padding0) == 75, "found %lld\n",
(long long)(int)offsetof(struct obd_connect_data, padding0));
- LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding0) == 2, "found %lld\n",
+ LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding0) == 1, "found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->padding0));
LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 76, "found %lld\n",
(long long)(int)offsetof(struct obd_connect_data, padding1));
OBD_CONNECT2_COMPRESS);
LASSERTF(OBD_CONNECT2_UNALIGNED_DIO == 0x400000000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_UNALIGNED_DIO);
+ LASSERTF(OBD_CONNECT2_CONN_POLICY == 0x800000000ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT2_CONN_POLICY);
LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32);
CHECK_MEMBER(obd_connect_data, ocd_instance);
CHECK_MEMBER(obd_connect_data, ocd_maxbytes);
CHECK_MEMBER(obd_connect_data, ocd_maxmodrpcs);
+ CHECK_MEMBER(obd_connect_data, ocd_conn_policy);
CHECK_MEMBER(obd_connect_data, padding0);
CHECK_MEMBER(obd_connect_data, padding1);
CHECK_MEMBER(obd_connect_data, ocd_connect_flags2);
CHECK_DEFINE_64X(OBD_CONNECT2_LARGE_NID);
CHECK_DEFINE_64X(OBD_CONNECT2_COMPRESS);
CHECK_DEFINE_64X(OBD_CONNECT2_UNALIGNED_DIO);
+ CHECK_DEFINE_64X(OBD_CONNECT2_CONN_POLICY);
BLANK_LINE();
CHECK_VALUE_X(OBD_CKSUM_CRC32);
(long long)(int)offsetof(struct obd_connect_data, ocd_maxmodrpcs));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_maxmodrpcs) == 2, "found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_maxmodrpcs));
- LASSERTF((int)offsetof(struct obd_connect_data, padding0) == 74, "found %lld\n",
+ LASSERTF((int)offsetof(struct obd_connect_data, ocd_conn_policy) == 74, "found %lld\n",
+ (long long)(int)offsetof(struct obd_connect_data, ocd_conn_policy));
+ LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_conn_policy) == 1, "found %lld\n",
+ (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_conn_policy));
+ LASSERTF((int)offsetof(struct obd_connect_data, padding0) == 75, "found %lld\n",
(long long)(int)offsetof(struct obd_connect_data, padding0));
- LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding0) == 2, "found %lld\n",
+ LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding0) == 1, "found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->padding0));
LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 76, "found %lld\n",
(long long)(int)offsetof(struct obd_connect_data, padding1));
OBD_CONNECT2_COMPRESS);
LASSERTF(OBD_CONNECT2_UNALIGNED_DIO == 0x400000000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT2_UNALIGNED_DIO);
+ LASSERTF(OBD_CONNECT2_CONN_POLICY == 0x800000000ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT2_CONN_POLICY);
LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32);