From 51dd1873f9b728a2ed2238a4f2778f3ce9eb7d41 Mon Sep 17 00:00:00 2001 From: Qian Yingjin Date: Mon, 30 Nov 2020 10:08:17 +0800 Subject: [PATCH] LU-10499 pcc: introducing OBD_CONNECT2_PCCRO flag 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 Change-Id: I19716e94a86e53353c1628d414c92e61e084dfc9 Reviewed-on: https://review.whamcloud.com/43105 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo --- lustre/include/uapi/linux/lustre/lustre_idl.h | 1 + lustre/obdclass/lprocfs_status.c | 4 ++++ lustre/ptlrpc/wiretest.c | 2 ++ lustre/utils/wirecheck.c | 1 + lustre/utils/wiretest.c | 2 ++ 5 files changed, 10 insertions(+) diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index cbea891..85db043 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -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 diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 8d63653..c60de8d 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -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 }; diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 31c977a..19927e5 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -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", diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index e0fa9ed..3274a4d 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -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); diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 77e495e..368795d 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -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", -- 1.8.3.1