Whamcloud - gitweb
LU-11213 uapi: reserve connect flag for plain layout 56/34656/2
authorLai Siyao <lai.siyao@whamcloud.com>
Fri, 22 Mar 2019 18:45:34 +0000 (02:45 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 18 Apr 2019 22:09:57 +0000 (22:09 +0000)
Reserve OBD_CONNECT2_PLAIN_LAYOUT flag, so that client supporting
plain layout won't enable plain layout if MDT doesn't support,
and in contrary, MDT supporting plain layout won't send such layout
to client that doesn't support.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ia629e17d83b5b48c94518de428e5abd79e5a37f0
Reviewed-on: https://review.whamcloud.com/34656
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/obdclass/lprocfs_status.c
lustre/ptlrpc/wiretest.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index a913214..08e9531 100644 (file)
@@ -836,6 +836,7 @@ struct ptlrpc_body_v2 {
 #define OBD_CONNECT2_SELINUX_POLICY    0x400ULL /* has client SELinux policy */
 #define OBD_CONNECT2_LSOM              0x800ULL /* LSOM support */
 #define OBD_CONNECT2_PCC               0x1000ULL /* Persistent Client Cache */
+#define OBD_CONNECT2_PLAIN_LAYOUT      0x2000ULL /* Plain Directory Layout */
 
 /* XXX README XXX:
  * Please DO NOT add flag values here before first ensuring that this same
index dbbf136..2ea931e 100644 (file)
@@ -786,6 +786,7 @@ static const char *obd_connect_names[] = {
        "selinux_policy",       /* 0x400 */
        "lsom",                 /* 0x800 */
        "pcc",                  /* 0x1000 */
+       "plain_layout",         /* 0x2000 */
        NULL
 };
 
index b3fbc19..c4fa761 100644 (file)
@@ -1342,6 +1342,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT2_LSOM);
        LASSERTF(OBD_CONNECT2_PCC == 0x1000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_PCC);
+       LASSERTF(OBD_CONNECT2_PLAIN_LAYOUT == 0x2000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_PLAIN_LAYOUT);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
index 850d5d7..0fd443d 100644 (file)
@@ -608,6 +608,7 @@ check_obd_connect_data(void)
        CHECK_DEFINE_64X(OBD_CONNECT2_SELINUX_POLICY);
        CHECK_DEFINE_64X(OBD_CONNECT2_LSOM);
        CHECK_DEFINE_64X(OBD_CONNECT2_PCC);
+       CHECK_DEFINE_64X(OBD_CONNECT2_PLAIN_LAYOUT);
 
        CHECK_VALUE_X(OBD_CKSUM_CRC32);
        CHECK_VALUE_X(OBD_CKSUM_ADLER);
index 8e61601..d220aa1 100644 (file)
@@ -1364,6 +1364,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT2_LSOM);
        LASSERTF(OBD_CONNECT2_PCC == 0x1000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_PCC);
+       LASSERTF(OBD_CONNECT2_PLAIN_LAYOUT == 0x2000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_PLAIN_LAYOUT);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",