Once reconnect happened during replay, we'd continue the open
replay with the last failed replay, but not the next.
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I164c40db143ca860ab59f60582942614d5fb7925
Reviewed-on: http://review.whamcloud.com/15871
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
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) {
/* Since the imp_committed_list is immutable before
* all of it's requests being replayed, it's safe to
* use a cursor to accelerate the search */
- imp->imp_replay_cursor = imp->imp_replay_cursor->next;
+ if (!imp->imp_resend_replay ||
+ imp->imp_replay_cursor == &imp->imp_committed_list)
+ imp->imp_replay_cursor =
+ imp->imp_replay_cursor->next;
while (imp->imp_replay_cursor !=
&imp->imp_committed_list) {