Whamcloud - gitweb
LU-3544 fid: add a connect flag for open by FID 93/8093/5
authorLai Siyao <lai.siyao@intel.com>
Tue, 29 Oct 2013 02:37:06 +0000 (10:37 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 18 Nov 2013 12:32:08 +0000 (12:32 +0000)
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>
Change-Id: I158b96e8f55fe357b3542d320e894aeca18fca94
Reviewed-on: http://review.whamcloud.com/8093
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/include/lustre/lustre_idl.h
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index f99ef62..9b7e941 100644 (file)
@@ -1299,6 +1299,8 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
 #define OBD_CONNECT_PINGLESS   0x4000000000000ULL/* pings not required */
 #define OBD_CONNECT_FLOCK_DEAD 0x8000000000000ULL/* improved 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 9d6a17b..7d2781b 100644 (file)
@@ -54,8 +54,8 @@ void lustre_assert_wire_constants(void)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
-         * running on Linux centos6-bis 2.6.32-358.0.1.el6-head #3 SMP Wed Apr 17 17:37:43 CEST 2013 
-         * with gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)  */
+         * running on Linux deva 2.6.32-358.18.1.el6_lustre.gdf685d2.x86_64 #1 SMP Sat Aug 31 20:41:4
+         * with gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)  */
 
 
        /* Constants... */
@@ -1159,7 +1159,9 @@ void lustre_assert_wire_constants(void)
        LASSERTF(OBD_CONNECT_PINGLESS == 0x4000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_PINGLESS);
        LASSERTF(OBD_CONNECT_FLOCK_DEAD == 0x8000000000000ULL, "found 0x%.16llxULL\n",
-                OBD_CONNECT_FLOCK_DEAD);
+                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",
index faa27b4..36808f7 100644 (file)
@@ -523,6 +523,7 @@ check_obd_connect_data(void)
        CHECK_DEFINE_64X(OBD_CONNECT_SHORTIO);
        CHECK_DEFINE_64X(OBD_CONNECT_PINGLESS);
        CHECK_DEFINE_64X(OBD_CONNECT_FLOCK_DEAD);
+       CHECK_DEFINE_64X(OBD_CONNECT_OPEN_BY_FID);
 
        CHECK_VALUE_X(OBD_CKSUM_CRC32);
        CHECK_VALUE_X(OBD_CKSUM_ADLER);
index 593b8aa..6581525 100644 (file)
@@ -62,8 +62,8 @@ void lustre_assert_wire_constants(void)
 {
         /* Wire protocol assertions generated by 'wirecheck'
          * (make -C lustre/utils newwiretest)
-         * running on Linux centos6-bis 2.6.32-358.0.1.el6-head #3 SMP Wed Apr 17 17:37:43 CEST 2013 
-         * with gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)  */
+         * running on Linux deva 2.6.32-358.18.1.el6_lustre.gdf685d2.x86_64 #1 SMP Sat Aug 31 20:41:4
+         * with gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)  */
 
 
        /* Constants... */
@@ -1167,7 +1167,9 @@ void lustre_assert_wire_constants(void)
        LASSERTF(OBD_CONNECT_PINGLESS == 0x4000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_PINGLESS);
        LASSERTF(OBD_CONNECT_FLOCK_DEAD == 0x8000000000000ULL, "found 0x%.16llxULL\n",
-                OBD_CONNECT_FLOCK_DEAD);
+                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",