summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiu Yawei <yawei.niu@intel.com>2016-10-28 01:11:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-30 18:00:12 +0300
commitb44c295dba07da4b235a1bb9281e525b4fbb8263 (patch)
treede0782b69bc7d45d5c312b9cbbc1dda6cb4af137
parentc2242d14234a3f68d6ee326d155c8771dc2c6aa8 (diff)
downloadlinux-b44c295dba07da4b235a1bb9281e525b4fbb8263.tar.xz
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 <yawei.niu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6802 Reviewed-on: http://review.whamcloud.com/15871 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/recover.c4
1 files changed, 3 insertions, 1 deletions
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) {