From patchwork Thu Feb 27 21:12:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 11410073 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4801B138D for ; Thu, 27 Feb 2020 21:29:35 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 30837246A0 for ; Thu, 27 Feb 2020 21:29:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30837246A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lustre-devel-bounces@lists.lustre.org Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id C8D84349490; Thu, 27 Feb 2020 13:25:28 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from smtp3.ccs.ornl.gov (smtp3.ccs.ornl.gov [160.91.203.39]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 2EE4121FD46 for ; Thu, 27 Feb 2020 13:19:36 -0800 (PST) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp3.ccs.ornl.gov (Postfix) with ESMTP id 510482C71; Thu, 27 Feb 2020 16:18:16 -0500 (EST) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 4F5FF46F; Thu, 27 Feb 2020 16:18:16 -0500 (EST) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Thu, 27 Feb 2020 16:12:03 -0500 Message-Id: <1582838290-17243-256-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> References: <1582838290-17243-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 255/622] lustre: ptlrpc: IR doesn't reconnect after EAGAIN X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sergey Cheremencev , Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Sergey Cheremencev There is a chance that client is connecting to OST before recovery start when OST is not configured. In such case OST returns EAGAIN(target->obd_no_conn == 1). There is no problem when pinger_recov is enabled because ptlrpc_pinger_main will reconnect later. But it doesn't reconnect when pinger_recov is 0. Move setting imp_connect_error to ptlrpc_connect_interpret. It is needed to store there only connection errors. Cray-bug-id: LUS-2034 WC-bug-id: https://jira.whamcloud.com/browse/LU-11601 Lustre-commit: 3341c8c31871 ("LU-11601 ptlrpc: IR doesn't reconnect after EAGAIN") Signed-off-by: Sergey Cheremencev Reviewed-on: https://es-gerrit.dev.cray.com/153542 Reviewed-by: Alexey Lyashkov Reviewed-by: Vitaly Fertman Reviewed-on: https://review.whamcloud.com/33557 Reviewed-by: Andreas Dilger Reviewed-by: Alexandr Boyko Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- fs/lustre/include/obd_support.h | 1 + fs/lustre/ptlrpc/client.c | 1 - fs/lustre/ptlrpc/import.c | 1 + fs/lustre/ptlrpc/pinger.c | 3 ++- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/lustre/include/obd_support.h b/fs/lustre/include/obd_support.h index 36955e8..9ebdcb6 100644 --- a/fs/lustre/include/obd_support.h +++ b/fs/lustre/include/obd_support.h @@ -264,6 +264,7 @@ #define OBD_FAIL_OST_STATFS_EINPROGRESS 0x231 #define OBD_FAIL_OST_SET_INFO_NET 0x232 #define OBD_FAIL_OST_DISCONNECT_DELAY 0x245 +#define OBD_FAIL_OST_PREPARE_DELAY 0x247 #define OBD_FAIL_LDLM 0x300 #define OBD_FAIL_LDLM_NAMESPACE_NEW 0x301 diff --git a/fs/lustre/ptlrpc/client.c b/fs/lustre/ptlrpc/client.c index f57ec1883..0f5aa92 100644 --- a/fs/lustre/ptlrpc/client.c +++ b/fs/lustre/ptlrpc/client.c @@ -1457,7 +1457,6 @@ static int after_reply(struct ptlrpc_request *req) lustre_msg_get_service_time(req->rq_repmsg)); rc = ptlrpc_check_status(req); - imp->imp_connect_error = rc; if (rc) { /* diff --git a/fs/lustre/ptlrpc/import.c b/fs/lustre/ptlrpc/import.c index 39d9e3e..a75856a 100644 --- a/fs/lustre/ptlrpc/import.c +++ b/fs/lustre/ptlrpc/import.c @@ -944,6 +944,7 @@ static int ptlrpc_connect_interpret(const struct lu_env *env, return 0; } + imp->imp_connect_error = rc; if (rc) { struct ptlrpc_request *free_req; struct ptlrpc_request *tmp; diff --git a/fs/lustre/ptlrpc/pinger.c b/fs/lustre/ptlrpc/pinger.c index c565e2d..c3fbddc 100644 --- a/fs/lustre/ptlrpc/pinger.c +++ b/fs/lustre/ptlrpc/pinger.c @@ -228,7 +228,8 @@ static void ptlrpc_pinger_process_import(struct obd_import *imp, if (level == LUSTRE_IMP_DISCON && !imp_is_deactive(imp)) { /* wait for a while before trying recovery again */ imp->imp_next_ping = ptlrpc_next_reconnect(imp); - if (!imp->imp_no_pinger_recover) + if (!imp->imp_no_pinger_recover || + imp->imp_connect_error == -EAGAIN) ptlrpc_initiate_recovery(imp); } else if (level != LUSTRE_IMP_FULL || imp->imp_obd->obd_no_recov ||