staging: lustre: mdt: add OBD_CONNECT_DIR_STRIPE flag
authorwang di <di.wang@intel.com>
Fri, 19 Aug 2016 18:07:28 +0000 (14:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2016 14:09:27 +0000 (16:09 +0200)
Add OBD_CONNECT_DIR_STRIPE to tell if the client supports
striped dir, so only new client (>= 2.6) can access striped
directory.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4843
Reviewed-on: http://review.whamcloud.com/10773
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@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/llite/llite_lib.c
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
drivers/staging/lustre/lustre/ptlrpc/wiretest.c

index 95454510a212f75157dffd14ead789d83554e9ce..c57231bf64ab2bdb06bda6b9f14a5fe70a0dc2a8 100644 (file)
@@ -1291,6 +1291,7 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
                                                         */
 #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
index 64c8a2ba4fe6e022ee188173199ff44034f55deb..49ed3df37810fcc9d8f3023e56c8304afd733491 100644 (file)
@@ -190,7 +190,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 45e3c4a9f6f6ebfa419ac3aa2331b995bfc89857..3d6da741ea4742dc34144eabb7a0d4b01c08b7af 100644 (file)
@@ -101,6 +101,8 @@ static const char * const obd_connect_names[] = {
        "unknown",
        "unlink_close",
        "unknown",
+       "dir_stripe",
+       "unknown",
        NULL
 };
 
index b428528b89d682624530be2e1cbf43d05ac7c5fd..3748f71628db7acb4213c467f878d5b86ff440cb 100644 (file)
@@ -1075,6 +1075,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",