Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2695691pxb; Tue, 9 Mar 2021 08:41:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6LHP5XuwiwgUJnkDgB4Q+MGfY/pgJf8U+VtP0EpLrx69rV0PxylVhUY9XPZx9rnQN5i0H X-Received: by 2002:a17:906:4015:: with SMTP id v21mr22091750ejj.433.1615308101537; Tue, 09 Mar 2021 08:41:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615308101; cv=none; d=google.com; s=arc-20160816; b=xxwF/7Wvnx0azXuo82fc0acXDcUQzeWEr/L9rHvqhwmJ/6U5gwRilJ2JOZg4af9rsS hPOVkpf8w4Oqt+mu/Dz+1ftMhUtXFlMe3ZAwfFVaSkQtJ6U9SRufcv1H4KXTvxXo4NY5 xp1rP1UTEkHZ0EdG1M5qGXYYkEEtkC+ugBwXfgkhP2xWwj+oyI3qAJqzmPJXqlAQsueJ 0yuozYKgDqtn9a/lTucAyKiyFjDBjd/9q8BDE9YUhBq1CLBT6yft5TlkXqF1oc0/+MVp gfcegf+hb6bqgciHGacjjAL5G/nwh9vLRlsRxRHUcMyCLfYoWcE3gIHyHihHa/X5Mq3I 3V0Q== 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=69i+Kqm2tSQribVksdoEZn878zwrWbYDQHP9bZFzNds=; b=odx5xDsLgd3yg2yP6mpq2wJidb/4Kl+B4sF81RYubEj42QeM0FieaO/CEHZgC0N/y5 itwq49gmYUmoRckYhd1oYHeaWOIhShcibasWU42iAK/mBa6T6VzLDIQnaZZxHBcdbU50 Q5BzEm3M2+Q8ktWbXr1jkDdKXdarOSw6UqbdMjIME4HE2GMYvFDkTn21GR65pwqnGeND p236cS6cDSG5ITG9B3ruDbym7wBUJQIUWgjewmQUnEyV4bVwUSpyy5hypwDskOUkxG3G JyQDakb5QP9csdjmIeEaKjq6jTPJIJBpWbqlMc2wkl8XslLyUsqsMgyq46tvHFosntcd WvmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="AhD/ey35"; 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 p32si11070687edd.89.2021.03.09.08.41.10; Tue, 09 Mar 2021 08:41:41 -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="AhD/ey35"; 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 S230453AbhCIQkd (ORCPT + 99 others); Tue, 9 Mar 2021 11:40:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229916AbhCIQkC (ORCPT ); Tue, 9 Mar 2021 11:40:02 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2B32C06174A for ; Tue, 9 Mar 2021 08:40:01 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id dx17so29492118ejb.2 for ; Tue, 09 Mar 2021 08:40:01 -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=69i+Kqm2tSQribVksdoEZn878zwrWbYDQHP9bZFzNds=; b=AhD/ey358MwoaB/ac9Jwun2keZfqgpxFjGmrRxi8lZR8RIxwCI7Fkx8xYAf8A7Zj19 Lw9t++ISn8WaPuN+p04c97bHSTk/A1du4dqKwmuQawDLFy6J7Rgy0pTs9aLHF4SWiZaC DssOLXvA5zb1QVKmECsgNAvc0dnpTvATu1Z0SW3GtcF0XegQtvM2JAk9DrsThDhB+iUc 2lqkK0fHO1vfQxyYHHkWfarulgyHy6iPeUCJnONdCYtprl04As1mNg9Elw/cFsek4nWv V1MSiDQtiXWupgyfnLcvRdRNfTECWAPNP1VK73XJI/LX9kjt7Njwq7TfPIfp9leNv225 3elg== 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=69i+Kqm2tSQribVksdoEZn878zwrWbYDQHP9bZFzNds=; b=eCB5SBxFJVCKxfdTpC/rGoD3iy8iC/9kgBp/qyLsklQM7qAKQKJSVyEG3JAIkW12iQ W9cc8EerQrkq7Y7Uq8jWpYwtgEameX9tqHUwggMPacSwDWReuPeSnWOPi2LFf7CgsM72 GzTvWHqQswXy+liyCnQox04roOGTczLdJKogY6tMICNlqZwbkHUHxYc1jBk3/9s/lNUd bUwXN4xNx9Jl6ZQJuGii2ZbKS054yDAL4llYslEklPydC4j+q8oLES3LVCBKs18nBwKh uRRw5YE0aBiuxUxq1RgWmX0SAIBd2Ppj0QTMDkFXrUDe4AZO3t/QBsVvzwAvMbN3Jn50 yKSA== X-Gm-Message-State: AOAM5319EeLRutENKlp9NOPc2pCSS6SiYk5DS1HDmk5PUsUbH+fGZ2we wETGfA+B4/RTMjwSm2t5cwrQWtdOXPFX4BPF4L8= X-Received: by 2002:a17:906:e2d4:: with SMTP id gr20mr21529681ejb.432.1615308000013; Tue, 09 Mar 2021 08:40:00 -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:39:48 -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 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) > > --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 > > >