From d9ac6b2e7eaaad892a2ecd0460b0f6915216c1cd 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. Signed-off-by: Qian Yingjin Change-Id: I19716e94a86e53353c1628d414c92e61e084dfc9 --- lustre/include/uapi/linux/lustre/lustre_idl.h | 1 + lustre/obdclass/lprocfs_status.c | 8 ++++++++ lustre/ptlrpc/wiretest.c | 2 ++ lustre/utils/wirecheck.c | 1 + lustre/utils/wiretest.c | 2 ++ 5 files changed, 14 insertions(+) diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index c36b710..9eab4f0 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -851,6 +851,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 8948f19..8695dbf 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -637,6 +637,14 @@ static const char *const obd_connect_names[] = { "getattr_pfid", /* 0x20000 */ "lseek", /* 0x40000 */ "dom_lvb", /* 0x80000 */ + "mne_type", /* 0x100000 */ + "ldlm_convert", /* 0x200000 */ + "batch_rpc", /* 0x400000 */ + "dom_lvb", /* 0x800000 */ + "mne_type", /* 0x1000000 */ + "ldlm_convert", /* 0x2000000 */ + "batch_rpc", /* 0x4000000 */ + "pccro", /* 0x8000000 */ NULL }; diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 1b4c051..cb80952 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 312d37e..5f36a63 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 80bc3c4..6b54680 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