* [PATCH 0/4] staging: lustre: obd: reserve connection flags
@ 2016-11-23 23:01 James Simmons
2016-11-23 23:01 ` [PATCH 1/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_SUBTREE James Simmons
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: James Simmons @ 2016-11-23 23:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
Cc: Linux Kernel Mailing List, Lustre Development List, James Simmons
Reserve several OBD_CONNECT_* flags for future use.
Fan Yong (4):
staging: lustre: obd: reserve connection flag OBD_CONNECT_SUBTREE
staging: lustre: obd: reserve connection flag OBD_CONNECT_LOCK_AHEAD
staging: lustre: obd: reserve connection flag OBD_CONNECT_OBDOPACK
staging: lustre: obd: reserve connection flag OBD_CONNECT_FLAGS2
.../lustre/lustre/include/lustre/lustre_idl.h | 6 +++++-
.../lustre/lustre/obdclass/lprocfs_status.c | 5 ++++-
.../staging/lustre/lustre/ptlrpc/pack_generic.c | 3 ++-
drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 16 ++++++++++++----
4 files changed, 23 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_SUBTREE
2016-11-23 23:01 [PATCH 0/4] staging: lustre: obd: reserve connection flags James Simmons
@ 2016-11-23 23:01 ` James Simmons
2016-11-23 23:01 ` [PATCH 2/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_LOCK_AHEAD James Simmons
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: James Simmons @ 2016-11-23 23:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
Cc: Linux Kernel Mailing List, Lustre Development List, Fan Yong,
James Simmons
From: Fan Yong <fan.yong@intel.com>
The connection flag OBD_CONNECT_SUBTREE will be used for the
following the patch: LU-28 mounting of filesystem from MDS
http://review.whamcloud.com/5007
Land the connection flags to master 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/17644
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
.../lustre/lustre/include/lustre/lustre_idl.h | 1 +
.../lustre/lustre/obdclass/lprocfs_status.c | 1 +
drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 2 ++
3 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 5c1fb6c..eb0dce6 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -1189,6 +1189,7 @@ struct ptlrpc_body_v2 {
* RPCs in parallel
*/
#define OBD_CONNECT_DIR_STRIPE 0x400000000000000ULL/* striped DNE dir */
+#define OBD_CONNECT_SUBTREE 0x800000000000000ULL /* fileset mount */
/** bulk matchbits is sent within ptlrpc_body */
#define OBD_CONNECT_BULK_MBITS 0x2000000000000000ULL
diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
index db49992..f78928f 100644
--- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
+++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
@@ -102,6 +102,7 @@
"unlink_close",
"multi_mod_rpcs",
"dir_stripe",
+ "subtree",
"bulk_mbits",
"unknown",
NULL
diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
index b239563..5619f11 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
@@ -1105,6 +1105,8 @@ void lustre_assert_wire_constants(void)
OBD_CONNECT_MULTIMODRPCS);
LASSERTF(OBD_CONNECT_DIR_STRIPE == 0x400000000000000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_DIR_STRIPE);
+ LASSERTF(OBD_CONNECT_SUBTREE == 0x800000000000000ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT_SUBTREE);
LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32);
LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
--
1.7.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_LOCK_AHEAD
2016-11-23 23:01 [PATCH 0/4] staging: lustre: obd: reserve connection flags James Simmons
2016-11-23 23:01 ` [PATCH 1/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_SUBTREE James Simmons
@ 2016-11-23 23:01 ` James Simmons
2016-11-23 23:01 ` [PATCH 3/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_OBDOPACK James Simmons
2016-11-23 23:01 ` [PATCH 4/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_FLAGS2 James Simmons
3 siblings, 0 replies; 5+ messages in thread
From: James Simmons @ 2016-11-23 23:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
Cc: Linux Kernel Mailing List, Lustre Development List, Fan Yong,
James Simmons
From: Fan Yong <fan.yong@intel.com>
The connection flag OBD_CONNECT_LOCK_AHEAD will be used for the
following the patch: LU-6917 LDLM lock ahead
http://review.whamcloud.com/13564
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/17645
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
.../lustre/lustre/include/lustre/lustre_idl.h | 1 +
.../lustre/lustre/obdclass/lprocfs_status.c | 1 +
drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 2 ++
3 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index eb0dce6..1079d0a 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -1190,6 +1190,7 @@ struct ptlrpc_body_v2 {
*/
#define OBD_CONNECT_DIR_STRIPE 0x400000000000000ULL/* striped DNE dir */
#define OBD_CONNECT_SUBTREE 0x800000000000000ULL /* fileset mount */
+#define OBD_CONNECT_LOCK_AHEAD 0x1000000000000000ULL /* lock ahead */
/** bulk matchbits is sent within ptlrpc_body */
#define OBD_CONNECT_BULK_MBITS 0x2000000000000000ULL
diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
index f78928f..5e341e3 100644
--- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
+++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
@@ -103,6 +103,7 @@
"multi_mod_rpcs",
"dir_stripe",
"subtree",
+ "lock_ahead",
"bulk_mbits",
"unknown",
NULL
diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
index 5619f11..afa79d5 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
@@ -1107,6 +1107,8 @@ void lustre_assert_wire_constants(void)
OBD_CONNECT_DIR_STRIPE);
LASSERTF(OBD_CONNECT_SUBTREE == 0x800000000000000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_SUBTREE);
+ LASSERTF(OBD_CONNECT_LOCK_AHEAD == 0x1000000000000000ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT_LOCK_AHEAD);
LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32);
LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
--
1.7.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_OBDOPACK
2016-11-23 23:01 [PATCH 0/4] staging: lustre: obd: reserve connection flags James Simmons
2016-11-23 23:01 ` [PATCH 1/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_SUBTREE James Simmons
2016-11-23 23:01 ` [PATCH 2/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_LOCK_AHEAD James Simmons
@ 2016-11-23 23:01 ` James Simmons
2016-11-23 23:01 ` [PATCH 4/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_FLAGS2 James Simmons
3 siblings, 0 replies; 5+ messages in thread
From: James Simmons @ 2016-11-23 23:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
Cc: Linux Kernel Mailing List, Lustre Development List, Fan Yong,
James Simmons
From: Fan Yong <fan.yong@intel.com>
The connection flag OBD_CONNECT_OBDOPACK will be used for the
following the patch: LU-4215 optimize OUT protocol
http://review.whamcloud.com/15336
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/17646
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
.../lustre/lustre/include/lustre/lustre_idl.h | 1 +
.../lustre/lustre/obdclass/lprocfs_status.c | 2 +-
drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 2 ++
3 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 1079d0a..a4020d2 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -1193,6 +1193,7 @@ struct ptlrpc_body_v2 {
#define OBD_CONNECT_LOCK_AHEAD 0x1000000000000000ULL /* lock ahead */
/** bulk matchbits is sent within ptlrpc_body */
#define OBD_CONNECT_BULK_MBITS 0x2000000000000000ULL
+#define OBD_CONNECT_OBDOPACK 0x4000000000000000ULL /* compact OUT obdo */
/* XXX README XXX:
* Please DO NOT add flag values here before first ensuring that this same
diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
index 5e341e3..85b505e 100644
--- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
+++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
@@ -105,7 +105,7 @@
"subtree",
"lock_ahead",
"bulk_mbits",
- "unknown",
+ "compact_obdo",
NULL
};
diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
index afa79d5..04e9471 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
@@ -1109,6 +1109,8 @@ void lustre_assert_wire_constants(void)
OBD_CONNECT_SUBTREE);
LASSERTF(OBD_CONNECT_LOCK_AHEAD == 0x1000000000000000ULL, "found 0x%.16llxULL\n",
OBD_CONNECT_LOCK_AHEAD);
+ LASSERTF(OBD_CONNECT_OBDOPACK == 0x4000000000000000ULL, "found 0x%.16llxULL\n",
+ OBD_CONNECT_OBDOPACK);
LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32);
LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
--
1.7.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_FLAGS2
2016-11-23 23:01 [PATCH 0/4] staging: lustre: obd: reserve connection flags James Simmons
` (2 preceding siblings ...)
2016-11-23 23:01 ` [PATCH 3/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_OBDOPACK James Simmons
@ 2016-11-23 23:01 ` James Simmons
3 siblings, 0 replies; 5+ messages in thread
From: James Simmons @ 2016-11-23 23:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
Cc: Linux Kernel Mailing List, Lustre Development List, Fan Yong,
James Simmons
From: Fan Yong <fan.yong@intel.com>
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>
---
.../lustre/lustre/include/lustre/lustre_idl.h | 3 ++-
.../lustre/lustre/obdclass/lprocfs_status.c | 1 +
.../staging/lustre/lustre/ptlrpc/pack_generic.c | 3 ++-
drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 10 ++++++----
4 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index a4020d2..5f42c54 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -1194,6 +1194,7 @@ struct ptlrpc_body_v2 {
/** 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 */
/* XXX README XXX:
* Please DO NOT add flag values here before first ensuring that this same
@@ -1249,7 +1250,7 @@ struct obd_connect_data {
__u16 ocd_maxmodrpcs; /* Maximum modify RPCs in parallel */
__u16 padding0; /* added 2.1.0. also fix lustre_swab_connect */
__u32 padding1; /* added 2.1.0. also fix lustre_swab_connect */
- __u64 padding2; /* added 2.1.0. also fix lustre_swab_connect */
+ __u64 ocd_connect_flags2;
__u64 padding3; /* added 2.1.0. also fix lustre_swab_connect */
__u64 padding4; /* added 2.1.0. also fix lustre_swab_connect */
__u64 padding5; /* added 2.1.0. also fix lustre_swab_connect */
diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
index 85b505e..2f2e8fc 100644
--- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
+++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
@@ -106,6 +106,7 @@
"lock_ahead",
"bulk_mbits",
"compact_obdo",
+ "second_flags",
NULL
};
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
index 39c4e18..30c5e91 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
@@ -1566,7 +1566,8 @@ void lustre_swab_connect(struct obd_connect_data *ocd)
__swab16s(&ocd->ocd_maxmodrpcs);
CLASSERT(offsetof(typeof(*ocd), padding0));
CLASSERT(offsetof(typeof(*ocd), padding1) != 0);
- CLASSERT(offsetof(typeof(*ocd), padding2) != 0);
+ if (ocd->ocd_connect_flags & OBD_CONNECT_FLAGS2)
+ __swab64s(&ocd->ocd_connect_flags2);
CLASSERT(offsetof(typeof(*ocd), padding3) != 0);
CLASSERT(offsetof(typeof(*ocd), padding4) != 0);
CLASSERT(offsetof(typeof(*ocd), padding5) != 0);
diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
index 04e9471..f50f487 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",
--
1.7.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-23 23:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-23 23:01 [PATCH 0/4] staging: lustre: obd: reserve connection flags James Simmons
2016-11-23 23:01 ` [PATCH 1/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_SUBTREE James Simmons
2016-11-23 23:01 ` [PATCH 2/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_LOCK_AHEAD James Simmons
2016-11-23 23:01 ` [PATCH 3/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_OBDOPACK James Simmons
2016-11-23 23:01 ` [PATCH 4/4] staging: lustre: obd: reserve connection flag OBD_CONNECT_FLAGS2 James Simmons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®