Whamcloud - gitweb
LU-4843 mdt: Add OBD_CONNECT_DIR_STRIPE flag 73/10773/7
authorWang Di <di.wang@intel.com>
Sat, 21 Jun 2014 07:59:25 +0000 (00:59 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 2 Jul 2014 03:25:02 +0000 (03:25 +0000)
Add OBD_CONNECT_DIR_STRIPE to tell if the client supports
striped dir, so only new client (>= 2.6) can access striped
directory.

Change-Id: I5d5f1a6a9f5efdce0c6fe22106a8853cd78bb486
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/10773
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
lustre/include/lustre/lustre_idl.h
lustre/llite/llite_lib.c
lustre/mdt/mdt_internal.h
lustre/obdclass/lprocfs_status.c
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index 6f21697..f790fa1 100644 (file)
@@ -1350,6 +1350,7 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
                                                       name in request */
 #define OBD_CONNECT_LFSCK      0x40000000000000ULL/* support online LFSCK */
 #define OBD_CONNECT_UNLINK_CLOSE 0x100000000000000ULL/* close file in unlink */
+#define OBD_CONNECT_DIR_STRIPE  0x400000000000000ULL /* striped DNE dir */
 
 /* XXX README XXX:
  * Please DO NOT add flag values here before first ensuring that this same
@@ -1395,7 +1396,8 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
                                OBD_CONNECT_PINGLESS | OBD_CONNECT_MAX_EASIZE |\
                                OBD_CONNECT_FLOCK_DEAD | \
                                OBD_CONNECT_DISP_STRIPE | OBD_CONNECT_LFSCK | \
-                               OBD_CONNECT_OPEN_BY_FID)
+                               OBD_CONNECT_OPEN_BY_FID | \
+                               OBD_CONNECT_DIR_STRIPE)
 
 #define OST_CONNECT_SUPPORTED  (OBD_CONNECT_SRVLOCK | OBD_CONNECT_GRANT | \
                                 OBD_CONNECT_REQPORTAL | OBD_CONNECT_VERSION | \
index 76e0f3b..8a43a1f 100644 (file)
@@ -214,7 +214,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
                                  OBD_CONNECT_MAX_EASIZE |
                                  OBD_CONNECT_FLOCK_DEAD |
                                  OBD_CONNECT_DISP_STRIPE | OBD_CONNECT_LFSCK |
-                                 OBD_CONNECT_OPEN_BY_FID;
+                                 OBD_CONNECT_OPEN_BY_FID |
+                                 OBD_CONNECT_DIR_STRIPE;
 
         if (sbi->ll_flags & LL_SBI_SOM_PREVIEW)
                 data->ocd_connect_flags |= OBD_CONNECT_SOM;
index dbfb7c5..9017957 100644 (file)
@@ -594,11 +594,9 @@ static inline bool mdt_is_dne_client(struct obd_export *exp)
        return !!(exp_connect_flags(exp) & OBD_CONNECT_LVB_TYPE);
 }
 
-/* Here we use OBD_CONNECT_DISP_STRIPE to check the client who support
- * striped directory, because it is also landed on 2.6 */
 static inline bool mdt_is_striped_client(struct obd_export *exp)
 {
-       return exp_connect_flags(exp) & OBD_CONNECT_DISP_STRIPE;
+       return exp_connect_flags(exp) & OBD_CONNECT_DIR_STRIPE;
 }
 
 int mdt_get_disposition(struct ldlm_reply *rep, int flag);
index 885b4d4..f18b4dc 100644 (file)
@@ -901,6 +901,8 @@ static const char *obd_connect_names[] = {
        "unknown",
        "unlink_close",
        "unknown",
+       "dir_stripe",
+       "unknown",
        NULL
 };
 
index 25c8e60..c6114e6 100644 (file)
@@ -1180,6 +1180,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT_LFSCK);
        LASSERTF(OBD_CONNECT_UNLINK_CLOSE == 0x100000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_UNLINK_CLOSE);
+       LASSERTF(OBD_CONNECT_DIR_STRIPE == 0x400000000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT_DIR_STRIPE);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
index cd9c821..416f8fe 100644 (file)
@@ -526,6 +526,7 @@ check_obd_connect_data(void)
        CHECK_DEFINE_64X(OBD_CONNECT_OPEN_BY_FID);
        CHECK_DEFINE_64X(OBD_CONNECT_LFSCK);
        CHECK_DEFINE_64X(OBD_CONNECT_UNLINK_CLOSE);
+       CHECK_DEFINE_64X(OBD_CONNECT_DIR_STRIPE);
 
        CHECK_VALUE_X(OBD_CKSUM_CRC32);
        CHECK_VALUE_X(OBD_CKSUM_ADLER);
index e2251be..55ec116 100644 (file)
@@ -1186,6 +1186,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT_LFSCK);
        LASSERTF(OBD_CONNECT_UNLINK_CLOSE == 0x100000000000000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT_UNLINK_CLOSE);
+       LASSERTF(OBD_CONNECT_DIR_STRIPE == 0x400000000000000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT_DIR_STRIPE);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",