Whamcloud - gitweb
LU-9846 obd: Add overstriping CONNECT flag 43/34743/2
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 23 Apr 2019 16:43:09 +0000 (12:43 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 4 May 2019 05:57:19 +0000 (05:57 +0000)
This patch reserves the OBD_CONNECT flag for overstriping,
and also does some cleanup of OBD_CONNECT flags, putting
them in the correct order and adding some missing ones in
proc and the wire{test,check} checks.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I5d7c8f30d16cc2541d3202582fe55177022ccede
Reviewed-on: https://review.whamcloud.com/34743
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
lustre/include/lustre_export.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/llite/llite_lib.c
lustre/obdclass/lprocfs_status.c
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index 5cf29e1..83e3bbe 100644 (file)
@@ -449,6 +449,11 @@ static inline int exp_connect_lockahead(struct obd_export *exp)
        return !!(exp_connect_flags2(exp) & OBD_CONNECT2_LOCKAHEAD);
 }
 
+static inline int exp_connect_overstriping(struct obd_export *exp)
+{
+       return !!(exp_connect_flags2(exp) & OBD_CONNECT2_OVERSTRIPING);
+}
+
 static inline int exp_connect_flr(struct obd_export *exp)
 {
        return !!(exp_connect_flags2(exp) & OBD_CONNECT2_FLR);
index 28e008d..73b5cd2 100644 (file)
@@ -829,6 +829,7 @@ struct ptlrpc_body_v2 {
 #define OBD_CONNECT2_LOCKAHEAD          0x2ULL /* ladvise lockahead v2 */
 #define OBD_CONNECT2_DIR_MIGRATE        0x4ULL /* migrate striped dir */
 #define OBD_CONNECT2_SUM_STATFS                0x8ULL /* MDT return aggregated stats */
+#define OBD_CONNECT2_OVERSTRIPING      0x10ULL /* OST overstriping support */
 #define OBD_CONNECT2_FLR               0x20ULL /* FLR support */
 #define OBD_CONNECT2_WBC_INTENTS       0x40ULL /* create/unlink/... intents for wbc, also operations under client-held parent locks */
 #define OBD_CONNECT2_LOCK_CONVERT      0x80ULL /* IBITS lock convert support */
@@ -887,10 +888,11 @@ struct ptlrpc_body_v2 {
                                OBD_CONNECT_GRANT_PARAM | \
                                OBD_CONNECT_SHORTIO | OBD_CONNECT_FLAGS2)
 
-#define MDT_CONNECT_SUPPORTED2 (OBD_CONNECT2_FILE_SECCTX | OBD_CONNECT2_FLR | \
-                                OBD_CONNECT2_SUM_STATFS | \
-                               OBD_CONNECT2_LOCK_CONVERT | \
+#define MDT_CONNECT_SUPPORTED2 (OBD_CONNECT2_FILE_SECCTX | \
                                OBD_CONNECT2_DIR_MIGRATE | \
+                               OBD_CONNECT2_SUM_STATFS | \
+                               OBD_CONNECT2_FLR |\
+                               OBD_CONNECT2_LOCK_CONVERT | \
                                OBD_CONNECT2_ARCHIVE_ID_ARRAY | \
                                OBD_CONNECT2_SELINUX_POLICY | \
                                OBD_CONNECT2_LSOM)
index b3b35eb..273af31 100644 (file)
@@ -224,10 +224,10 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
                                  OBD_CONNECT_GRANT_PARAM |
                                  OBD_CONNECT_SHORTIO | OBD_CONNECT_FLAGS2;
 
-       data->ocd_connect_flags2 = OBD_CONNECT2_FLR |
-                                  OBD_CONNECT2_LOCK_CONVERT |
-                                  OBD_CONNECT2_DIR_MIGRATE |
+       data->ocd_connect_flags2 = OBD_CONNECT2_DIR_MIGRATE |
                                   OBD_CONNECT2_SUM_STATFS |
+                                  OBD_CONNECT2_FLR |
+                                  OBD_CONNECT2_LOCK_CONVERT |
                                   OBD_CONNECT2_ARCHIVE_ID_ARRAY |
                                   OBD_CONNECT2_LSOM;
 
index 2ea931e..aa2925a 100644 (file)
@@ -776,8 +776,8 @@ static const char *obd_connect_names[] = {
        "file_secctx",  /* 0x01 */
        "lockaheadv2",  /* 0x02 */
        "dir_migrate",  /* 0x04 */
-       "unknown",      /* 0x08 */
-       "unknown",      /* 0x10 */
+       "sum_statfs",   /* 0x08 */
+       "overstriping", /* 0x10 */
        "flr",          /* 0x20 */
        "wbc",          /* 0x40 */
        "lock_convert",  /* 0x80 */
index c4fa761..deda48f 100644 (file)
@@ -1328,6 +1328,10 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT2_LOCKAHEAD);
        LASSERTF(OBD_CONNECT2_DIR_MIGRATE == 0x4ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_DIR_MIGRATE);
+       LASSERTF(OBD_CONNECT2_SUM_STATFS == 0x8ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_SUM_STATFS);
+       LASSERTF(OBD_CONNECT2_OVERSTRIPING == 0x10ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_OVERSTRIPING);
        LASSERTF(OBD_CONNECT2_FLR == 0x20ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_FLR);
        LASSERTF(OBD_CONNECT2_WBC_INTENTS == 0x40ULL, "found 0x%.16llxULL\n",
index 0fd443d..ae8cf00 100644 (file)
@@ -601,6 +601,8 @@ check_obd_connect_data(void)
        CHECK_DEFINE_64X(OBD_CONNECT2_FILE_SECCTX);
        CHECK_DEFINE_64X(OBD_CONNECT2_LOCKAHEAD);
        CHECK_DEFINE_64X(OBD_CONNECT2_DIR_MIGRATE);
+       CHECK_DEFINE_64X(OBD_CONNECT2_SUM_STATFS);
+       CHECK_DEFINE_64X(OBD_CONNECT2_OVERSTRIPING);
        CHECK_DEFINE_64X(OBD_CONNECT2_FLR);
        CHECK_DEFINE_64X(OBD_CONNECT2_WBC_INTENTS);
        CHECK_DEFINE_64X(OBD_CONNECT2_LOCK_CONVERT);
index d220aa1..e7edcad 100644 (file)
@@ -1350,6 +1350,10 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT2_LOCKAHEAD);
        LASSERTF(OBD_CONNECT2_DIR_MIGRATE == 0x4ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_DIR_MIGRATE);
+       LASSERTF(OBD_CONNECT2_SUM_STATFS == 0x8ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_SUM_STATFS);
+       LASSERTF(OBD_CONNECT2_OVERSTRIPING == 0x10ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_OVERSTRIPING);
        LASSERTF(OBD_CONNECT2_FLR == 0x20ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_FLR);
        LASSERTF(OBD_CONNECT2_WBC_INTENTS == 0x40ULL, "found 0x%.16llxULL\n",