From c9f9e9c54f5284093b689dd0d7fa8baf5a5b2c97 Mon Sep 17 00:00:00 2001 From: Jinshan Xiong Date: Tue, 21 Jul 2015 08:25:56 -0700 Subject: [PATCH] LU-6802 ptlrpc: reset replay cursor on reconnection In this way, clients can make sure every single replayable ptlrpc requests will be replayed and replies will be received. Test-Parameters: envdefinitions=PTLDEBUG=+inode mdtfilesystemtype=ldiskfs mdsfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs clientdistro=el6.6 ossdistro=el6.6 mdsdistro=el6.6 mdscount=2 mdtcount=4 testlist=sanity,sanity,sanity,sanity,sanity,sanity Signed-off-by: Jinshan Xiong Change-Id: I32daf787d141c84376879fb0fb3b3eb8424f91ad Reviewed-on: http://review.whamcloud.com/15669 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Hongchao Zhang Reviewed-by: Oleg Drokin --- lustre/ptlrpc/import.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index e8f595b..709cbe9 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -1211,6 +1211,12 @@ static int ptlrpc_connect_interpret(const struct lu_env *env, lustre_msg_get_last_committed(request->rq_repmsg)); } + /* LU-6802: Reset replay cursor on successful reconnect */ + spin_lock(&imp->imp_lock); + imp->imp_replay_cursor = &imp->imp_committed_list; + imp->imp_last_replay_transno = 0; + spin_unlock(&imp->imp_lock); + finish: rc = ptlrpc_import_recovery_state_machine(imp); if (rc == -ENOTCONN) { -- 1.8.3.1