Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2810237rwb; Mon, 15 Aug 2022 11:48:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR5DZS/m0jfjGp1Y4mySMnd34xEa7xhIoUxhXWbVgcj0FITKKhWHCK5PGYD4ByJ3xe5qZpXh X-Received: by 2002:a17:907:94d6:b0:730:bfe6:8352 with SMTP id dn22-20020a17090794d600b00730bfe68352mr11090684ejc.348.1660589288272; Mon, 15 Aug 2022 11:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589288; cv=none; d=google.com; s=arc-20160816; b=n1kaBlvrIVzz/Bfy3rVI8lFw6IbWdHSYcXJRG1D0cLHve9JjMb+tftt/hLnqy/kuTt WbnN87zN/Z/Bgax8uxisU70FXoKgL1OhCe0qEFIdHaQu3iDDbvk1GpOANlXayZSSKji4 pYLZOzz2xHQu+f/+JHQotMDp76tPw5CGVvkW9vWsOaV8A7arkBDV8VgteZhY/1img7xa XnRhUBSiLIGARWOHzfI561t8FG35DlxHTnUq2Y6rTJQCr27+v1b7YxfiYSns/lbLvzN2 gdRXF4F4dmYyrj3+doRORG1s70p3fEArIcEVxyi1PPCvU4uGP64mLiPLxA3hQC60tGQJ WeNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FmCP4Qk9imqMmY0p4NFro8cIkdDtUgq6Om9Sz9FmdPo=; b=XBAUfGMS35gUJYjhaUlWHoLlQNBVQGQElkzTNzUOoI5GToDIVyQQYGzYrDS+KsS9d7 zXpJvsFBdq6k7iMM80o6afJ4ognyEeAig62oJGdbIwMP37h58H5v/7ChVZ57E6eGL8L6 UxqU14azUEYJDmwmkGDIR5GGE1DJthpz7UJns3dnWZqKfMAHUoM+gRfnxVggevWOYyRB gtk33v1JXKBb3+rRjjBcwh3KeSW6KtzXYsmQixr17X9G5GsO3f7RsLKftlZXM2yM2bPX ipFGckuUAhf80uzK3pZqRf1dkCm8GJ59/xGyK1Gn841EaWv5xbYKqqDSXPrBNP4kl+XG +zJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YI0Cl5H9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q9-20020aa7da89000000b0043e077babe0si7605092eds.325.2022.08.15.11.47.42; Mon, 15 Aug 2022 11:48:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YI0Cl5H9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233613AbiHOSOb (ORCPT + 99 others); Mon, 15 Aug 2022 14:14:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233444AbiHOSOB (ORCPT ); Mon, 15 Aug 2022 14:14:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE8AE2A725; Mon, 15 Aug 2022 11:13:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3AD9DB81072; Mon, 15 Aug 2022 18:13:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94B84C433C1; Mon, 15 Aug 2022 18:13:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587233; bh=YiqcZxqXh6b5ciK1fYu6kiA0CLiPRo9JnCP9IWXnUug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YI0Cl5H9VJ6M2kPpT3cdMiwhwgOcYdIiHZNV5RccZp5uOi6fU3OhseWSyEHN8iddq 4kPa+vvBAao+fdAaBMuWDxLJLqdLUAzpsl1q8lSKevZ6PltnHDKEPHDcqoFa9nXQgD U+s5PdajhR78f6na7VqHUzbXPoyloYzs4vBpeyLc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust Subject: [PATCH 5.15 005/779] pNFS/flexfiles: Report RDMA connection errors to the server Date: Mon, 15 Aug 2022 19:54:09 +0200 Message-Id: <20220815180337.392508647@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Trond Myklebust commit 7836d75467e9d214bdf5c693b32721de729a6e38 upstream. The RPC/RDMA driver will return -EPROTO and -ENODEV as connection errors under certain circumstances. Make sure that we handle them and report them to the server. If not, we can end up cycling forever in a LAYOUTGET/LAYOUTRETURN loop. Fixes: a12f996d3413 ("NFSv4/pNFS: Use connections to a DS that are all of the same protocol family") Cc: stable@vger.kernel.org # 5.11.x Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- fs/nfs/flexfilelayout/flexfilelayout.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -1140,6 +1140,8 @@ static int ff_layout_async_handle_error_ case -EIO: case -ETIMEDOUT: case -EPIPE: + case -EPROTO: + case -ENODEV: dprintk("%s DS connection error %d\n", __func__, task->tk_status); nfs4_delete_deviceid(devid->ld, devid->nfs_client, @@ -1245,6 +1247,8 @@ static void ff_layout_io_track_ds_error( case -ENOBUFS: case -EPIPE: case -EPERM: + case -EPROTO: + case -ENODEV: *op_status = status = NFS4ERR_NXIO; break; case -EACCES: