From b44c295dba07da4b235a1bb9281e525b4fbb8263 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Thu, 27 Oct 2016 18:11:54 -0400 Subject: [PATCH] staging: lustre: recovery: don't skip open replay on reconnect 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 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6802 Reviewed-on: http://review.whamcloud.com/15871 Reviewed-by: Jinshan Xiong Reviewed-by: Hongchao Zhang Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/ptlrpc/recover.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/recover.c b/drivers/staging/lustre/lustre/ptlrpc/recover.c index aa9653498044..9144cd8deeaa 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/recover.c +++ b/drivers/staging/lustre/lustre/ptlrpc/recover.c @@ -111,7 +111,9 @@ int ptlrpc_replay_next(struct obd_import *imp, int *inflight) * 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) { -- 2.11.4.GIT