Whamcloud - gitweb
LU-6802 ptlrpc: reset replay cursor on reconnection 69/15669/2
authorJinshan Xiong <jinshan.xiong@intel.com>
Tue, 21 Jul 2015 15:25:56 +0000 (08:25 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 27 Jul 2015 19:03:38 +0000 (19:03 +0000)
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 <jinshan.xiong@intel.com>
Change-Id: I32daf787d141c84376879fb0fb3b3eb8424f91ad
Reviewed-on: http://review.whamcloud.com/15669
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/import.c

index e8f595b..709cbe9 100644 (file)
@@ -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) {