[PATCH 06/12] staging: lustre: fid: add a connect flag for open by FID

2016-04-27 Thread James Simmons
From: Lai Siyao 

Add OBD_CONNECT_OPEN_BY_FID for open by FID, if MDS supports this,
for open by FID, it won't retry with name if object with the FID
doesn't exist; while if client supports this, client won't pack
name in open request if FID is known.

Signed-off-by: Lai Siyao 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3544
Reviewed-on: http://review.whamcloud.com/8093
Reviewed-by: John L. Hammond 
Reviewed-by: Andreas Dilger 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 3 +++
 drivers/staging/lustre/lustre/ptlrpc/wiretest.c   | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 26819ee..0ef540a 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -1257,6 +1257,9 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
 #define OBD_CONNECT_PINGLESS   0x4ULL/* pings not required */
 #define OBD_CONNECT_FLOCK_DEAD 0x8ULL/* flock deadlock detection */
 #define OBD_CONNECT_DISP_STRIPE 0x10ULL/*create stripe 
disposition*/
+#define OBD_CONNECT_OPEN_BY_FID0x20ULL /* open by fid 
won't pack
+* name in request
+*/
 
 /* XXX README XXX:
  * Please DO NOT add flag values here before first ensuring that this same
diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c 
b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
index 87555e4..308b6b96 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
@@ -1069,6 +1069,8 @@ void lustre_assert_wire_constants(void)
 OBD_CONNECT_PINGLESS);
LASSERTF(OBD_CONNECT_FLOCK_DEAD == 0x8ULL,
 "found 0x%.16llxULL\n", OBD_CONNECT_FLOCK_DEAD);
+   LASSERTF(OBD_CONNECT_OPEN_BY_FID == 0x20ULL,
+"found 0x%.16llxULL\n", OBD_CONNECT_OPEN_BY_FID);
LASSERTF(OBD_CKSUM_CRC32 == 0x0001UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32);
LASSERTF(OBD_CKSUM_ADLER == 0x0002UL, "found 0x%.8xUL\n",
-- 
2.7.4



[PATCH 06/12] staging: lustre: fid: add a connect flag for open by FID

2016-04-27 Thread James Simmons
From: Lai Siyao 

Add OBD_CONNECT_OPEN_BY_FID for open by FID, if MDS supports this,
for open by FID, it won't retry with name if object with the FID
doesn't exist; while if client supports this, client won't pack
name in open request if FID is known.

Signed-off-by: Lai Siyao 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3544
Reviewed-on: http://review.whamcloud.com/8093
Reviewed-by: John L. Hammond 
Reviewed-by: Andreas Dilger 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 3 +++
 drivers/staging/lustre/lustre/ptlrpc/wiretest.c   | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 26819ee..0ef540a 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -1257,6 +1257,9 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
 #define OBD_CONNECT_PINGLESS   0x4ULL/* pings not required */
 #define OBD_CONNECT_FLOCK_DEAD 0x8ULL/* flock deadlock detection */
 #define OBD_CONNECT_DISP_STRIPE 0x10ULL/*create stripe 
disposition*/
+#define OBD_CONNECT_OPEN_BY_FID0x20ULL /* open by fid 
won't pack
+* name in request
+*/
 
 /* XXX README XXX:
  * Please DO NOT add flag values here before first ensuring that this same
diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c 
b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
index 87555e4..308b6b96 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
@@ -1069,6 +1069,8 @@ void lustre_assert_wire_constants(void)
 OBD_CONNECT_PINGLESS);
LASSERTF(OBD_CONNECT_FLOCK_DEAD == 0x8ULL,
 "found 0x%.16llxULL\n", OBD_CONNECT_FLOCK_DEAD);
+   LASSERTF(OBD_CONNECT_OPEN_BY_FID == 0x20ULL,
+"found 0x%.16llxULL\n", OBD_CONNECT_OPEN_BY_FID);
LASSERTF(OBD_CKSUM_CRC32 == 0x0001UL, "found 0x%.8xUL\n",
(unsigned)OBD_CKSUM_CRC32);
LASSERTF(OBD_CKSUM_ADLER == 0x0002UL, "found 0x%.8xUL\n",
-- 
2.7.4