staging: lustre: fid: add a connect flag for open by FID
authorLai Siyao <lai.siyao@intel.com>
Thu, 28 Apr 2016 01:37:15 +0000 (21:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Apr 2016 04:53:18 +0000 (21:53 -0700)
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 <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3544
Reviewed-on: http://review.whamcloud.com/8093
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
drivers/staging/lustre/lustre/ptlrpc/wiretest.c

index 26819ee969a53d8339e6cb25fdec6e7c4404d16b..0ef540aebafbff45266ab7ef4af5219353ecfa7b 100644 (file)
@@ -1257,6 +1257,9 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
 #define OBD_CONNECT_PINGLESS   0x4000000000000ULL/* pings not required */
 #define OBD_CONNECT_FLOCK_DEAD 0x8000000000000ULL/* flock deadlock detection */
 #define OBD_CONNECT_DISP_STRIPE 0x10000000000000ULL/*create stripe disposition*/
+#define OBD_CONNECT_OPEN_BY_FID        0x20000000000000ULL     /* 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
index 87555e4948262f805b30d1dfee231ac145d2ad55..308b6b9686e88905f09d1d691947b9619765c68f 100644 (file)
@@ -1069,6 +1069,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT_PINGLESS);
        LASSERTF(OBD_CONNECT_FLOCK_DEAD == 0x8000000000000ULL,
                 "found 0x%.16llxULL\n", OBD_CONNECT_FLOCK_DEAD);
+       LASSERTF(OBD_CONNECT_OPEN_BY_FID == 0x20000000000000ULL,
+                "found 0x%.16llxULL\n", OBD_CONNECT_OPEN_BY_FID);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",