Whamcloud - gitweb
LU-10499 pcc: introducing OBD_CONNECT2_PCCRO flag
authorQian Yingjin <qian@ddn.com>
Mon, 30 Nov 2020 02:08:17 +0000 (10:08 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 26 Mar 2021 21:11:12 +0000 (21:11 +0000)
Add a new connection flag OBD_CONNECT2_PCCRO to solve the access
consistency from the old client without PCC-RO support.

Lustre-change: https://review.whamcloud.com/40791
Lustre-commit: TBD (from d9ac6b2e7eaaad892a2ecd0460b0f6915216c1cd)

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I19716e94a86e53353c1628d414c92e61e084dfc9
Reviewed-on: https://review.whamcloud.com/43105
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@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 cbea891..85db043 100644 (file)
@@ -871,6 +871,7 @@ struct ptlrpc_body_v2 {
 #define OBD_CONNECT2_GETATTR_PFID      0x20000ULL /* pack parent FID in getattr */
 #define OBD_CONNECT2_LSEEK            0x40000ULL /* SEEK_HOLE/DATA RPC */
 #define OBD_CONNECT2_DOM_LVB          0x80000ULL /* pack DOM glimpse data in LVB */
+#define OBD_CONNECT2_PCCRO           0x800000ULL /* Read-only PCC */
 /* XXX README XXX:
  * Please DO NOT add flag values here before first ensuring that this same
  * flag value is not in use on some other branch.  Please clear any such
index 8d63653..c60de8d 100644 (file)
@@ -635,6 +635,10 @@ static const char *obd_connect_names[] = {
        "getattr_pfid",         /* 0x20000 */
        "lseek",                /* 0x40000 */
        "dom_lvb",              /* 0x80000 */
+       "mne_type",             /* 0x100000 */
+       "ldlm_convert",         /* 0x200000 */
+       "batch_rpc",            /* 0x400000 */
+       "pccro",                /* 0x800000 */
        NULL
 };
 
index 31c977a..19927e5 100644 (file)
@@ -1383,6 +1383,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT2_LSEEK);
        LASSERTF(OBD_CONNECT2_DOM_LVB == 0x80000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_DOM_LVB);
+       LASSERTF(OBD_CONNECT2_PCCRO == 0x800000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_PCCRO);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
index e0fa9ed..3274a4d 100644 (file)
@@ -628,6 +628,7 @@ check_obd_connect_data(void)
        CHECK_DEFINE_64X(OBD_CONNECT2_GETATTR_PFID);
        CHECK_DEFINE_64X(OBD_CONNECT2_LSEEK);
        CHECK_DEFINE_64X(OBD_CONNECT2_DOM_LVB);
+       CHECK_DEFINE_64X(OBD_CONNECT2_PCCRO);
 
        CHECK_VALUE_X(OBD_CKSUM_CRC32);
        CHECK_VALUE_X(OBD_CKSUM_ADLER);
index 77e495e..368795d 100644 (file)
@@ -1415,6 +1415,8 @@ void lustre_assert_wire_constants(void)
                 OBD_CONNECT2_LSEEK);
        LASSERTF(OBD_CONNECT2_DOM_LVB == 0x80000ULL, "found 0x%.16llxULL\n",
                 OBD_CONNECT2_DOM_LVB);
+       LASSERTF(OBD_CONNECT2_PCCRO == 0x800000ULL, "found 0x%.16llxULL\n",
+                OBD_CONNECT2_PCCRO);
        LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
                (unsigned)OBD_CKSUM_CRC32);
        LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",