From 455ce0cef704e4c9a39bfa9d7c172ca3b31c5fef Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Tue, 5 Jan 2016 17:15:30 -0700 Subject: [PATCH] LU-6349 idl: remove obsolete RPC MSG flags Add comments for MSG_* flags, and delete obsolete flags MSG_LAST_REPLAY, MSG_AT_SUPPORT, MSG_DELAY_REPLAY, MSG_VERSION_REPLAY. Remove now-unused imp_no_lock_replay field. Add comments for MSG_CONNECT_* flags, and delete obsolete flag MSG_CONNECT_ASYNC. Delete them from wirecheck files. Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: I4f6ba93151246d173d796a6625a683cf65f767f7 Reviewed-on: https://review.whamcloud.com/17831 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Ben Evans Reviewed-by: Steve Guminski Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lustre/include/lustre_import.h | 3 --- lustre/include/uapi/linux/lustre/lustre_idl.h | 38 +++++++++++++-------------- lustre/obdclass/lprocfs_status.c | 1 - lustre/ptlrpc/client.c | 4 --- lustre/ptlrpc/wiretest.c | 8 ------ lustre/utils/wirecheck.c | 4 --- lustre/utils/wiretest.c | 8 ------ 7 files changed, 19 insertions(+), 47 deletions(-) diff --git a/lustre/include/lustre_import.h b/lustre/include/lustre_import.h index 3c605b0..ef677d1 100644 --- a/lustre/include/lustre_import.h +++ b/lustre/include/lustre_import.h @@ -282,9 +282,6 @@ struct obd_import { imp_server_timeout:1, /* VBR: imp in delayed recovery */ imp_delayed_recovery:1, - /* VBR: if gap was found then no lock replays - */ - imp_no_lock_replay:1, /* recovery by versions was failed */ imp_vbr_failed:1, /* force an immidiate ping */ diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index ad76a85..64814fe 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -614,26 +614,26 @@ struct lustre_msg_v2 { #define LUSTRE_LOG_VERSION 0x00050000 #define LUSTRE_MGS_VERSION 0x00060000 -/* pb_flags that apply to all requests */ -#define MSG_LAST_REPLAY 0x0001 -#define MSG_RESENT 0x0002 -#define MSG_REPLAY 0x0004 -/* #define MSG_AT_SUPPORT 0x0008 obsolete 1.5 */ -#define MSG_DELAY_REPLAY 0x0010 -#define MSG_VERSION_REPLAY 0x0020 -#define MSG_REQ_REPLAY_DONE 0x0040 -#define MSG_LOCK_REPLAY_DONE 0x0080 - -/* pb_op_flags for all connect opcodes (MDS_CONNECT, OST_CONNECT) */ -#define MSG_CONNECT_RECOVERING 0x00000001 -#define MSG_CONNECT_RECONNECT 0x00000002 -#define MSG_CONNECT_REPLAYABLE 0x00000004 -/* #define MSG_CONNECT_PEER 0x00000008 removed 1.5 */ -#define MSG_CONNECT_LIBCLIENT 0x00000010 -#define MSG_CONNECT_INITIAL 0x00000020 -#define MSG_CONNECT_ASYNC 0x00000040 +/* pb_flags that apply to all request messages */ +/* #define MSG_LAST_REPLAY 0x0001 obsolete 2.0 => {REQ,LOCK}_REPLAY_DONE */ +#define MSG_RESENT 0x0002 /* was previously sent, no reply seen */ +#define MSG_REPLAY 0x0004 /* was processed, got reply, recovery */ +/* #define MSG_AT_SUPPORT 0x0008 obsolete since 1.5, AT always enabled */ +/* #define MSG_DELAY_REPLAY 0x0010 obsolete since 2.0 */ +/* #define MSG_VERSION_REPLAY 0x0020 obsolete since 1.8.2, VBR always on */ +#define MSG_REQ_REPLAY_DONE 0x0040 /* request replay over, locks next */ +#define MSG_LOCK_REPLAY_DONE 0x0080 /* lock replay over, client done */ + +/* pb_op_flags for connect opcodes: MDS_CONNECT, OST_CONNECT, MGS_CONNECT */ +#define MSG_CONNECT_RECOVERING 0x00000001 /* target is in recovery */ +#define MSG_CONNECT_RECONNECT 0x00000002 /* tgt already has client import */ +#define MSG_CONNECT_REPLAYABLE 0x00000004 /* target supports RPC replay */ +/* #define MSG_CONNECT_PEER 0x00000008 obsolete since 1.2, removed in 1.5 */ +#define MSG_CONNECT_LIBCLIENT 0x00000010 /* obsolete since 2.3, removed 2.6 */ +#define MSG_CONNECT_INITIAL 0x00000020 /* first client connection attempt */ +/* #define MSG_CONNECT_ASYNC 0x00000040 obsolete since 1.5 */ #define MSG_CONNECT_NEXT_VER 0x00000080 /* use next version of lustre_msg */ -#define MSG_CONNECT_TRANSNO 0x00000100 /* report transno */ +#define MSG_CONNECT_TRANSNO 0x00000100 /* client sent transno in replay */ /* number of previous object versions in pb_pre_versions[] */ #define PTLRPC_NUM_VERSIONS 4 diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index d2505ef..343533a 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -769,7 +769,6 @@ static void obd_import_flags2str(struct obd_import *imp, struct seq_file *m) flag2str(deactive); flag2str(replayable); flag2str(delayed_recovery); - flag2str(no_lock_replay); flag2str(vbr_failed); flag2str(pingable); flag2str(resend_replay); diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index e145ea3..a3e7ffa 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -2972,7 +2972,6 @@ static int ptlrpc_replay_interpret(const struct lu_env *env, DEBUG_REQ(D_WARNING, req, "Version mismatch during replay\n"); spin_lock(&imp->imp_lock); imp->imp_vbr_failed = 1; - imp->imp_no_lock_replay = 1; spin_unlock(&imp->imp_lock); lustre_msg_set_status(req->rq_repmsg, aa->praa_old_status); } else { @@ -2986,9 +2985,6 @@ static int ptlrpc_replay_interpret(const struct lu_env *env, } spin_lock(&imp->imp_lock); - /** if replays by version then gap occur on server, no trust to locks */ - if (lustre_msg_get_flags(req->rq_repmsg) & MSG_VERSION_REPLAY) - imp->imp_no_lock_replay = 1; imp->imp_last_replay_transno = lustre_msg_get_transno(req->rq_reqmsg); spin_unlock(&imp->imp_lock); LASSERT(imp->imp_last_replay_transno); diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 37dbd45..66fcf6c 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1012,16 +1012,10 @@ void lustre_assert_wire_constants(void) (long long)MSGHDR_AT_SUPPORT); LASSERTF(MSGHDR_CKSUM_INCOMPAT18 == 2, "found %lld\n", (long long)MSGHDR_CKSUM_INCOMPAT18); - LASSERTF(MSG_LAST_REPLAY == 0x00000001UL, "found 0x%.8xUL\n", - (unsigned)MSG_LAST_REPLAY); LASSERTF(MSG_RESENT == 0x00000002UL, "found 0x%.8xUL\n", (unsigned)MSG_RESENT); LASSERTF(MSG_REPLAY == 0x00000004UL, "found 0x%.8xUL\n", (unsigned)MSG_REPLAY); - LASSERTF(MSG_DELAY_REPLAY == 0x00000010UL, "found 0x%.8xUL\n", - (unsigned)MSG_DELAY_REPLAY); - LASSERTF(MSG_VERSION_REPLAY == 0x00000020UL, "found 0x%.8xUL\n", - (unsigned)MSG_VERSION_REPLAY); LASSERTF(MSG_REQ_REPLAY_DONE == 0x00000040UL, "found 0x%.8xUL\n", (unsigned)MSG_REQ_REPLAY_DONE); LASSERTF(MSG_LOCK_REPLAY_DONE == 0x00000080UL, "found 0x%.8xUL\n", @@ -1036,8 +1030,6 @@ void lustre_assert_wire_constants(void) (unsigned)MSG_CONNECT_LIBCLIENT); LASSERTF(MSG_CONNECT_INITIAL == 0x00000020UL, "found 0x%.8xUL\n", (unsigned)MSG_CONNECT_INITIAL); - LASSERTF(MSG_CONNECT_ASYNC == 0x00000040UL, "found 0x%.8xUL\n", - (unsigned)MSG_CONNECT_ASYNC); LASSERTF(MSG_CONNECT_NEXT_VER == 0x00000080UL, "found 0x%.8xUL\n", (unsigned)MSG_CONNECT_NEXT_VER); LASSERTF(MSG_CONNECT_TRANSNO == 0x00000100UL, "found 0x%.8xUL\n", diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index eb99fe0..af3de37 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -462,11 +462,8 @@ check_ptlrpc_body(void) CHECK_VALUE(MSGHDR_AT_SUPPORT); CHECK_VALUE(MSGHDR_CKSUM_INCOMPAT18); - CHECK_VALUE_X(MSG_LAST_REPLAY); CHECK_VALUE_X(MSG_RESENT); CHECK_VALUE_X(MSG_REPLAY); - CHECK_VALUE_X(MSG_DELAY_REPLAY); - CHECK_VALUE_X(MSG_VERSION_REPLAY); CHECK_VALUE_X(MSG_REQ_REPLAY_DONE); CHECK_VALUE_X(MSG_LOCK_REPLAY_DONE); @@ -475,7 +472,6 @@ check_ptlrpc_body(void) CHECK_VALUE_X(MSG_CONNECT_REPLAYABLE); CHECK_VALUE_X(MSG_CONNECT_LIBCLIENT); CHECK_VALUE_X(MSG_CONNECT_INITIAL); - CHECK_VALUE_X(MSG_CONNECT_ASYNC); CHECK_VALUE_X(MSG_CONNECT_NEXT_VER); CHECK_VALUE_X(MSG_CONNECT_TRANSNO); } diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 1284bf7..ee3763f 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -1033,16 +1033,10 @@ void lustre_assert_wire_constants(void) (long long)MSGHDR_AT_SUPPORT); LASSERTF(MSGHDR_CKSUM_INCOMPAT18 == 2, "found %lld\n", (long long)MSGHDR_CKSUM_INCOMPAT18); - LASSERTF(MSG_LAST_REPLAY == 0x00000001UL, "found 0x%.8xUL\n", - (unsigned)MSG_LAST_REPLAY); LASSERTF(MSG_RESENT == 0x00000002UL, "found 0x%.8xUL\n", (unsigned)MSG_RESENT); LASSERTF(MSG_REPLAY == 0x00000004UL, "found 0x%.8xUL\n", (unsigned)MSG_REPLAY); - LASSERTF(MSG_DELAY_REPLAY == 0x00000010UL, "found 0x%.8xUL\n", - (unsigned)MSG_DELAY_REPLAY); - LASSERTF(MSG_VERSION_REPLAY == 0x00000020UL, "found 0x%.8xUL\n", - (unsigned)MSG_VERSION_REPLAY); LASSERTF(MSG_REQ_REPLAY_DONE == 0x00000040UL, "found 0x%.8xUL\n", (unsigned)MSG_REQ_REPLAY_DONE); LASSERTF(MSG_LOCK_REPLAY_DONE == 0x00000080UL, "found 0x%.8xUL\n", @@ -1057,8 +1051,6 @@ void lustre_assert_wire_constants(void) (unsigned)MSG_CONNECT_LIBCLIENT); LASSERTF(MSG_CONNECT_INITIAL == 0x00000020UL, "found 0x%.8xUL\n", (unsigned)MSG_CONNECT_INITIAL); - LASSERTF(MSG_CONNECT_ASYNC == 0x00000040UL, "found 0x%.8xUL\n", - (unsigned)MSG_CONNECT_ASYNC); LASSERTF(MSG_CONNECT_NEXT_VER == 0x00000080UL, "found 0x%.8xUL\n", (unsigned)MSG_CONNECT_NEXT_VER); LASSERTF(MSG_CONNECT_TRANSNO == 0x00000100UL, "found 0x%.8xUL\n", -- 1.8.3.1