From: Qian Yingjin Date: Fri, 1 Mar 2019 07:16:09 +0000 (+0800) Subject: LU-10092 pcc: Reserve a new connection flag for PCC X-Git-Tag: 2.12.53~40 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F56%2F34356%2F3;p=fs%2Flustre-release.git LU-10092 pcc: Reserve a new connection flag for PCC Reserve OBD_CONNECT2_PCC connection flag that will be set (in ocd_connect_flags2) if a Lustre server or a client supports Persistent Client Cache (PCC). Test-Parameters: trivial Signed-off-by: Qian Yingjin Change-Id: Ibe20c668a649be69475dc326ce56dc8708772d32 Reviewed-on: https://review.whamcloud.com/34356 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Patrick Farrell --- diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index 4c697d4..a913214 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -835,6 +835,7 @@ struct ptlrpc_body_v2 { #define OBD_CONNECT2_ARCHIVE_ID_ARRAY 0x100ULL /* store HSM archive_id in array */ #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 */ /* XXX README XXX: * Please DO NOT add flag values here before first ensuring that this same diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 8894a38..dbbf136 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -785,6 +785,7 @@ static const char *obd_connect_names[] = { "unknown", /* 0x200 */ "selinux_policy", /* 0x400 */ "lsom", /* 0x800 */ + "pcc", /* 0x1000 */ NULL }; diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 2f9d7d9..b3fbc19 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1340,6 +1340,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_SELINUX_POLICY); LASSERTF(OBD_CONNECT2_LSOM == 0x800ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_LSOM); + LASSERTF(OBD_CONNECT2_PCC == 0x1000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_PCC); 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 d3e3675..850d5d7 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -607,6 +607,7 @@ check_obd_connect_data(void) CHECK_DEFINE_64X(OBD_CONNECT2_ARCHIVE_ID_ARRAY); CHECK_DEFINE_64X(OBD_CONNECT2_SELINUX_POLICY); CHECK_DEFINE_64X(OBD_CONNECT2_LSOM); + CHECK_DEFINE_64X(OBD_CONNECT2_PCC); 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 c494c95..8e61601 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1362,6 +1362,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT2_SELINUX_POLICY); LASSERTF(OBD_CONNECT2_LSOM == 0x800ULL, "found 0x%.16llxULL\n", OBD_CONNECT2_LSOM); + LASSERTF(OBD_CONNECT2_PCC == 0x1000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT2_PCC); LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n", (unsigned)OBD_CKSUM_CRC32); LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",