Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934381AbcKQBGZ (ORCPT ); Wed, 16 Nov 2016 20:06:25 -0500 Received: from linuxhacker.ru ([217.76.32.60]:38394 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932263AbcKQBGT (ORCPT ); Wed, 16 Nov 2016 20:06:19 -0500 From: Oleg Drokin To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , James Simmons Cc: Linux Kernel Mailing List , Lustre Development List , Niu Yawei , Oleg Drokin Subject: [PATCH 2/2] staging/lustre/ptlrpc: update imp_known_replied_xid on resend-replay Date: Wed, 16 Nov 2016 20:05:30 -0500 Message-Id: <1479344730-1131617-3-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479344730-1131617-1-git-send-email-green@linuxhacker.ru> References: <1479344730-1131617-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1290 Lines: 34 From: Niu Yawei The imp_known_replied_xid should be updated when try to resend an already replied replay request, because the xid of this replay request could be less than current imp_known_replied_xid. Signed-off-by: Niu Yawei Reviewed-on: http://review.whamcloud.com/22776 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8645 Reviewed-by: Alex Zhuravlev Reviewed-by: Fan Yong Signed-off-by: Oleg Drokin --- 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 344aedd..c004490 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/recover.c +++ b/drivers/staging/lustre/lustre/ptlrpc/recover.c @@ -161,8 +161,10 @@ int ptlrpc_replay_next(struct obd_import *imp, int *inflight) * unreplied list. */ if (req && imp->imp_resend_replay && - list_empty(&req->rq_unreplied_list)) + list_empty(&req->rq_unreplied_list)) { ptlrpc_add_unreplied(req); + imp->imp_known_replied_xid = ptlrpc_known_replied_xid(imp); + } imp->imp_resend_replay = 0; spin_unlock(&imp->imp_lock); -- 2.7.4