From 872a2c06c62174f34a181c0abf3396f248acbae5 Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Mon, 27 Aug 2012 18:28:20 +0200 Subject: [PATCH] LU-1789 protocol: reserve connect flag for lightweight conn Reserve connection flag for lightweight connection support to avoid conflicts. The main property of a lightweight connection is that there is no entry in the last_rcvd file for this export, so no recovery is possible. This type of connection will be used by quota (between master & slave), FIDonOST and likely by other features in the future. Signed-off-by: Johann Lombardi Change-Id: I4367f5bfaef0207e7f307c4ea3d35e97ca99dc5b Reviewed-on: http://review.whamcloud.com/3851 Tested-by: Hudson Reviewed-by: Niu Yawei Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/include/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/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index f184b71..df67926 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -1157,6 +1157,7 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); * finer space reservation */ #define OBD_CONNECT_NANOSEC_TIME 0x200000000000ULL /* nanosecond timestamps */ #define OBD_CONNECT_LVB_TYPE 0x400000000000ULL /* variable type of LVB */ +#define OBD_CONNECT_LIGHTWEIGHT 0x1000000000000ULL/* lightweight connection */ /* 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 0b4941f..e1dc6de 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -952,6 +952,10 @@ static const char *obd_connect_names[] = { "umask", "einprogress", "grant_param", + "nanoseconds_times", + "lvb_type", + "unknown", + "lightweight_conn", NULL }; diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 2364570..3f262d0 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1075,6 +1075,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT_EINPROGRESS); LASSERTF(OBD_CONNECT_GRANT_PARAM == 0x100000000000ULL, "found 0x%.16llxULL\n", OBD_CONNECT_GRANT_PARAM); + LASSERTF(OBD_CONNECT_LIGHTWEIGHT == 0x1000000000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT_LIGHTWEIGHT); 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 2c4b4fc..ac7c842 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -489,6 +489,7 @@ check_obd_connect_data(void) CHECK_DEFINE_64X(OBD_CONNECT_UMASK); CHECK_DEFINE_64X(OBD_CONNECT_EINPROGRESS); CHECK_DEFINE_64X(OBD_CONNECT_GRANT_PARAM); + CHECK_DEFINE_64X(OBD_CONNECT_LIGHTWEIGHT); 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 b6d5d93..49d69d2 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1083,6 +1083,8 @@ void lustre_assert_wire_constants(void) OBD_CONNECT_EINPROGRESS); LASSERTF(OBD_CONNECT_GRANT_PARAM == 0x100000000000ULL, "found 0x%.16llxULL\n", OBD_CONNECT_GRANT_PARAM); + LASSERTF(OBD_CONNECT_LIGHTWEIGHT == 0x1000000000000ULL, "found 0x%.16llxULL\n", + OBD_CONNECT_LIGHTWEIGHT); 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