aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
diff options
context:
space:
mode:
authorFan Yong <fan.yong@intel.com>2016-11-23 18:01:20 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-29 21:50:38 +0100
commit3ce173a162e6cb86b5fe42d0ead2d9f20ec8085b (patch)
tree6d360a5a88ad22dc90bc4369c57e5d863a00b446 /drivers/staging/lustre/lustre/ptlrpc/wiretest.c
parentstaging: lustre: obd: reserve connection flag OBD_CONNECT_OBDOPACK (diff)
downloadlinux-dev-3ce173a162e6cb86b5fe42d0ead2d9f20ec8085b.tar.xz
linux-dev-3ce173a162e6cb86b5fe42d0ead2d9f20ec8085b.zip
staging: lustre: obd: reserve connection flag OBD_CONNECT_FLAGS2
This is a feature for the client and server to use obd_connect_flags2 to communicate future feature flags. The client should set this flag whenever any flags in that field are requested, and the server should mask unsupported features from this field (assuming it understands OBD_CONNECT_FLAGS2). When checking if an OBD_CONNECT2_xxxx feature is supported, the client/server needs to firstly check if OBD_CONNECT_FLAGS2 is supported, since this field is also beyond the end of the old obd_connect_data. Land the connection flags to upstream client earlier for reserving the slot to avoid potential conflict with others. Signed-off-by: Fan Yong <fan.yong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7543 Reviewed-on: http://review.whamcloud.com/17647 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Patrick Farrell <paf@cray.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/ptlrpc/wiretest.c')
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/wiretest.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
index 04e94710f9d1..f50f487ab450 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
@@ -935,10 +935,10 @@ void lustre_assert_wire_constants(void)
(long long)(int)offsetof(struct obd_connect_data, padding1));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding1) == 4, "found %lld\n",
(long long)(int)sizeof(((struct obd_connect_data *)0)->padding1));
- LASSERTF((int)offsetof(struct obd_connect_data, padding2) == 80, "found %lld\n",
- (long long)(int)offsetof(struct obd_connect_data, padding2));
- LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding2) == 8, "found %lld\n",
- (long long)(int)sizeof(((struct obd_connect_data *)0)->padding2));
+ LASSERTF((int)offsetof(struct obd_connect_data, ocd_connect_flags2) == 80, "found %lld\n",
+ (long long)(int)offsetof(struct obd_connect_data, ocd_connect_flags2));
+ LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_connect_flags2) == 8, "found %lld\n",
+ (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_connect_flags2));
LASSERTF((int)offsetof(struct obd_connect_data, padding3) == 88, "found %lld\n",
(long long)(int)offsetof(struct obd_connect_data, padding3));
LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding3) == 8, "found %lld\n",
@@ -1111,6 +1111,8 @@ void lustre_assert_wire_constants(void)
OBD_CONNECT_LOCK_AHEAD);
LASSERTF(OBD_CONNECT_OBDOPACK == 0x4000000000000000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_OBDOPACK);
+ LASSERTF(OBD_CONNECT_FLAGS2 == 0x8000000000000000ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT_FLAGS2);
LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32);
LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",