From e0640d98860754ed17268708429318f511e548bd Mon Sep 17 00:00:00 2001 From: Li Wei Date: Thu, 31 Jan 2013 17:48:23 +0800 Subject: [PATCH] LU-2467 protocol: Add OBD_CONNECT_PINGLESS Reserve a bit for OBD_CONNECT_PINGLESS, which indicates a client is capable of suppressing keep-alive OBD_PINGs. If granted by a server, it means the server does not require (but still allows) pings. Change-Id: Ie10f505badd4250582656295eac2fd6844bb76b3 Signed-off-by: Li Wei Reviewed-on: http://review.whamcloud.com/5232 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/include/lustre/lustre_idl.h | 1 + lustre/obdclass/lprocfs_status.c | 1 + lustre/ptlrpc/wiretest.c | 1 + lustre/utils/wirecheck.c | 1 + lustre/utils/wiretest.c | 1 + 5 files changed, 5 insertions(+) diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index 3ebcbfc..6417dcf 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -1115,6 +1115,7 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); #define OBD_CONNECT_NANOSEC_TIME 0x800000000000ULL /* nanosecond timestamps */ #define OBD_CONNECT_LIGHTWEIGHT 0x1000000000000ULL /* lightweight connection */ #define OBD_CONNECT_SHORTIO 0x2000000000000ULL /* short io */ +#define OBD_CONNECT_PINGLESS 0x4000000000000ULL /* pings not required */ /* 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 723db26..9ef31f0 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -828,6 +828,7 @@ static const char *obd_connect_names[] = { "nanosecond_times", "lightweight_conn", "short_io", + "pingless", NULL }; diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 65c64ba..80a23ab 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -546,6 +546,7 @@ void lustre_assert_wire_constants(void) CLASSERT(OBD_CONNECT_NANOSEC_TIME == 0x800000000000ULL); CLASSERT(OBD_CONNECT_LIGHTWEIGHT == 0x1000000000000ULL); CLASSERT(OBD_CONNECT_SHORTIO == 0x2000000000000ULL); + CLASSERT(OBD_CONNECT_PINGLESS == 0x4000000000000ULL); /* Checks for struct obdo */ LASSERTF((int)sizeof(struct obdo) == 208, " found %lld\n", diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index e8045f8..cf93658 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -251,6 +251,7 @@ static void check_obd_connect_data(void) CHECK_CDEFINE(OBD_CONNECT_NANOSEC_TIME); CHECK_CDEFINE(OBD_CONNECT_LIGHTWEIGHT); CHECK_CDEFINE(OBD_CONNECT_SHORTIO); + CHECK_CDEFINE(OBD_CONNECT_PINGLESS); } static void diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 26a7a1c..8bb44a0 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -543,6 +543,7 @@ void lustre_assert_wire_constants(void) CLASSERT(OBD_CONNECT_NANOSEC_TIME == 0x800000000000ULL); CLASSERT(OBD_CONNECT_LIGHTWEIGHT == 0x1000000000000ULL); CLASSERT(OBD_CONNECT_SHORTIO == 0x2000000000000ULL); + CLASSERT(OBD_CONNECT_PINGLESS == 0x4000000000000ULL); /* Checks for struct obdo */ LASSERTF((int)sizeof(struct obdo) == 208, " found %lld\n", -- 1.8.3.1