Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2700604pxb; Tue, 9 Mar 2021 08:48:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxd6qk0lVkpuHx7WcQmskTDeiSJSWVuvDTjNbhuSKxLetmWReVxSIA9luIZL2DEB/QZL8ML X-Received: by 2002:a17:906:b6c8:: with SMTP id ec8mr21573630ejb.223.1615308485609; Tue, 09 Mar 2021 08:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615308485; cv=none; d=google.com; s=arc-20160816; b=iwgw1U8BFkxjbTLW/q4fB2GbSlVYhG3AFG/2rFk8RNIOxieXLV9NnuMIrtRJx/u1Dy jzzDPjSLBs+wKIYjpj+OUZ5grNnu2+CmwLfifk9bp+QAN+n+dSKvEvtDSbLr8CDiUaTo EFp9m/9IcfffXSaiSt1N5yGWs8N/AWGN37cBc1OLiqHHO5rjEMGBWhiUsAs9cUfQJ4kO 5I2Dxkx9CZIDfTSY0ZFd17etunqDq74zAvrGiOaK3UjLzKpdTK+EGmoJXCNvuD/A/mns cQSzGcwtqvmQrM9Fdxx9ifAX2ECbncOM01JlgasIlBQX7xjzxr9uMFB3tt5fjTMHY/XD 2yvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DlJQQiI+2KtMRCT723Gi1SnSu+2f4QkI2kcfN0Kd4so=; b=e80UMqo9NGrOf0zu72r9wLVhvWPvLLJK74WEDigs+qluI5LRDDq9iZqGc7GtLNqiPz L2pjZ08adgx0nc8DVIvSn1WXB3ZsJhOHI5VcPVYDWwcmvW1gbbF6+oK1+Iljc2c7CI1h L8Jq/qnx+xIOBgrd77VcwPROT8bhFeH49fyTLujNbdDJrETWacd3WECIzElMs7EFiKuD sBfylQ6uH0Ok9R64tC3nyXWouPc4mACPs02/lG+IxuS91531G7h1QDSZ54Paz3DDVzpj d0IZP0orvYts0xH+D6/f4MYcxmStjRTcXqM0TC9FFJ/oCvnSct8apm3/Vdxg1dJvADNG Wjjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AAplqRJU; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i15si9148417eje.718.2021.03.09.08.47.41; Tue, 09 Mar 2021 08:48:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AAplqRJU; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230391AbhCIQq7 (ORCPT + 99 others); Tue, 9 Mar 2021 11:46:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbhCIQqm (ORCPT ); Tue, 9 Mar 2021 11:46:42 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C94ABC06174A for ; Tue, 9 Mar 2021 08:46:41 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id mm21so29474968ejb.12 for ; Tue, 09 Mar 2021 08:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DlJQQiI+2KtMRCT723Gi1SnSu+2f4QkI2kcfN0Kd4so=; b=AAplqRJUOQdV9sMrPmstGvYhgjxNxAyiV0cP/1I/LwHypGSZiPy26WgBUXfGghVsm1 ep6rTJoyaGhsoFm09BVQJviFScbhB67K/jS7bZpnDGNtP78tL0BpAbnsBHSX2VRhvbeA mH2HHashieVEQK/gobmDR6MO7//Zy4XO/2F7hd7vHm7pnjtHMZs4m72bp7XvW+WxoZ7H GGOrN89u8h6q3L1jiEoBS7296oeaLrqF8Vi+Pum+g1o0mE+eG/BWZ2Ki5Hh4yiEgRcqn mO4wBBqrGJoWaujDLEchqp5bPVSoRFYawIEiDPiHxfjwfsS8xv2RZy9Yq4U8lbYe2TK0 YIsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DlJQQiI+2KtMRCT723Gi1SnSu+2f4QkI2kcfN0Kd4so=; b=CcYYLSlspEyhTEz9uPd6HSmnZW8B8eogX+CTUG3KbTZ89EUOZj2TuhyYmeSJVXBy5C PmV+Lb4P6tcRP2QknAaCG0guq/X6Fd5HZVOtkaQA/VPwk521LQhfheO/PcPg3QsMAV2y /uYuDwNSTvFIVvI8nfwCVU39T7OZovKBTqqePGgKLESwLu1f7ux3rQSiY51QXQ6A2iO2 IKdxMKA5EsW42O89qf6dxHKIN8HJcwlUP+b+2kA5pZMS0LzprrstYvm7UkOIKC680b5y kX+tZJduNLDoS30fS0gGC6KmXcM4XD+3Df+jVgUWEoc6wusVYQKPMYEDiXclRIJSseFs BOsg== X-Gm-Message-State: AOAM532ItxYcVycttUlclgg6mB99pxBi2EdrwAn/0luQKjU/7NOUoKQO 1EXIw9GjWmKAiR3xQjrlY340ofHd/ivrqZr+JCr2FTl6 X-Received: by 2002:a17:906:9243:: with SMTP id c3mr21660249ejx.388.1615308399959; Tue, 09 Mar 2021 08:46:39 -0800 (PST) MIME-Version: 1.0 References: <20210309144127.57833-1-olga.kornievskaia@gmail.com> In-Reply-To: From: Olga Kornievskaia Date: Tue, 9 Mar 2021 11:46:28 -0500 Message-ID: Subject: Re: [PATCH 1/1] NFSD: fix error handling in callbacks To: "J. Bruce Fields" Cc: Chuck Lever , linux-nfs Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Mar 9, 2021 at 11:39 AM Olga Kornievskaia wrote: > > On Tue, Mar 9, 2021 at 10:37 AM J. Bruce Fields wrote: > > > > On Tue, Mar 09, 2021 at 09:41:27AM -0500, Olga Kornievskaia wrote: > > > From: Olga Kornievskaia > > > > > > When the server tries to do a callback and a client fails it due to > > > authentication problems, we need the server to set callback down > > > flag in RENEW so that client can recover. > > > > I was looking at this. It looks to me like this should really be just: > > > > case 1: > > if (task->tk_status) > > nfsd4_mark_cb_down(clp, task->tk_status); > > > > If tk_status showed an error, and the ->done method doesn't return 0 to > > tell us it something worth retrying, then the callback failed > > permanently, so we should mark the callback path down, regardless of the > > exact error. > > Ok. v2 coming (will change the title to make it 4.0 callback) Sigh, I didn't change the wording of the commit and left the authentication problem which is not accurate enough for this patch (as say connection errors are also covered by this patch). Do you need me to change the wording of the commit and send v3? > > > > > --b. > > > > > > > > Signed-off-by: Olga Kornievskaia > > > --- > > > fs/nfsd/nfs4callback.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c > > > index 052be5bf9ef5..7325592b456e 100644 > > > --- a/fs/nfsd/nfs4callback.c > > > +++ b/fs/nfsd/nfs4callback.c > > > @@ -1189,6 +1189,7 @@ static void nfsd4_cb_done(struct rpc_task *task, void *calldata) > > > switch (task->tk_status) { > > > case -EIO: > > > case -ETIMEDOUT: > > > + case -EACCES: > > > nfsd4_mark_cb_down(clp, task->tk_status); > > > } > > > break; > > > -- > > > 2.27.0 > > > > >