Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2823946pxb; Tue, 9 Mar 2021 11:46:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgvCNMfx4TCQgnwf9AvRY+zB1wZTOKNI64DsKzZR8eQwPhB289m5vnwK1ZLun9+saZgmXd X-Received: by 2002:a17:907:20c7:: with SMTP id qq7mr21450210ejb.528.1615319215816; Tue, 09 Mar 2021 11:46:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615319215; cv=none; d=google.com; s=arc-20160816; b=EEXYyppcwbYBisn2bIRbHuGWjrTNfhooBYycygFtAziDX52TcHPXGv1j2jMqRVaSDr lWQDl9O2ov+8yYX+9u3bLCcXpX9WMF7iMnWDEDsesM0bIsPuGza/6RrvcNGSauel2q4g mSemJHoiaxwUlv9ntaEggIBtViTScjMI6Fia6jg+ymJ5EWsYxeSGV5go0q3AKtHpV6vx nKUp86kOyn1WM4fil6nCPVywmdiu6Kjmk7Q5DpdNPzeuPorezxoFP09/6uNupcxvv0aL Ee7eLPoyR1K9r8MbfFvdEenjSN0DN+sTT1j6M58G/Z94+ZkqyHz5Bkowp5YgfW/9NiK5 V+oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2ISEKAhxoHEqz9Foo7+T5MpVFYer3dlOYkmfL7jYpNA=; b=vmur2EzBjXZUMqo588a4zdqKEc1huZlb4GYfIU6ZxC8a+V3mnspJAibZ7ZD25qjq4P 6PwO3s4AKD3F8CRxQPrbE9aGknAqqt893BBrnR1Lx9lOPj+fiUe6jKQxpw+NvMir3oQS GYdq0J3tG+YALgvc93tV1O8RL4XK6NjSSGMU9wCtoccZ6EI6vPBDiWXsIe9UsrgcTz7F AMr2Er1l5pO7p7484aB+3vNq95z0nqftOTgPD79OsHZdTXVB4UEaMao6VdDqVj776u4t /9O2QOPSpQ+qfB/zr6AlIXGHrjimBV6Sjr5fBhCe4+8B9sca04krMEFDJ0jldM4vEG0a R8tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Pwgp1Pmv; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b5si9599057edq.537.2021.03.09.11.46.25; Tue, 09 Mar 2021 11:46:55 -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=@redhat.com header.s=mimecast20190719 header.b=Pwgp1Pmv; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231138AbhCITpx (ORCPT + 99 others); Tue, 9 Mar 2021 14:45:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:55080 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231253AbhCITp1 (ORCPT ); Tue, 9 Mar 2021 14:45:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615319127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2ISEKAhxoHEqz9Foo7+T5MpVFYer3dlOYkmfL7jYpNA=; b=Pwgp1PmvHifP92XmA3SRmOdh10NkwDYlp+I/tFMeKu+4jMdU+Mvd7QLrVAjr//AisOuJtC 1NOJ1Y65HGp8A6uIuqF6F8S8JyGMqMpcXAFjbzYgRncpsBsiCkZGU+xh7H0FvlBYWCNOSC MzgjKPeVdRMD374l7Hpr3k+xS66FSgQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-296-t_f8ZQ2XPdS9uTghbSKthg-1; Tue, 09 Mar 2021 14:45:24 -0500 X-MC-Unique: t_f8ZQ2XPdS9uTghbSKthg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B08AE800C78; Tue, 9 Mar 2021 19:45:23 +0000 (UTC) Received: from aion.usersys.redhat.com (ovpn-112-89.rdu2.redhat.com [10.10.112.89]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0302A6062F; Tue, 9 Mar 2021 19:45:20 +0000 (UTC) Received: by aion.usersys.redhat.com (Postfix, from userid 1000) id 13C731A003C; Tue, 9 Mar 2021 14:45:19 -0500 (EST) Date: Tue, 9 Mar 2021 14:45:19 -0500 From: Scott Mayhew To: "J. Bruce Fields" Cc: Olga Kornievskaia , chuck.lever@oracle.com, linux-nfs@vger.kernel.org Subject: Re: [PATCH 1/1] NFSD: fix error handling in callbacks Message-ID: <20210309194519.GF2597609@aion.usersys.redhat.com> References: <20210309144127.57833-1-olga.kornievskaia@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, 09 Mar 2021, 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. That switch was added because the server was erroneously setting SEQ4_STATUS_CB_PATH_DOWN in the event that a client returned an NFS-level error for a CB_RECALL that the client had already done a FREE_STATEID for. Removing the switch will cause the server to go back to that behaviour, won't it? -Scott > > --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 > > >