Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2856898pxb; Tue, 9 Mar 2021 12:41:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+rUtBb13viPug6OIZ7um7nyMNXwdFZIDEjQl0om8oskiAY8Ey380p/zXsk8xNGqNU8SVQ X-Received: by 2002:a50:d753:: with SMTP id i19mr6286230edj.43.1615322510167; Tue, 09 Mar 2021 12:41:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615322510; cv=none; d=google.com; s=arc-20160816; b=lESo7uD8RPNdYoQSY5mfvQM/ig9G+TA3tpenzyPmQhIXEqOgvxY68sxvwRudQ2sv2W 0TI5ynYzemodCcglgCzPn9+PEHX29wY1vin5p9+DAPiw280rC+8Fl1mwd067hevuS20k nKKRHFnOa1uGV7Hbpt9OZES5dk6TxN9OL3Rm60nHzeToudjB794JPVKIGwug6yp2rQl9 QNWMxEIXbRAczgDZ7zg46Co+4I5k+so7o2Z4NolFlTTukP/rI5b1gsVh1smM0anJjy+b P/I9bw7WvrZaTKKiWyWpBMrLcbYPz08gnP6IM57ev/Sok+hH/OFxNAvnDnLei2BbM720 1DGw== 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=Gi63ugnu00FzCPzKu85LuhP3jDhGaWx5Wdxx54aMeeI=; b=P7sSH8iUxPnkpe60vk7PGPdTlq48JX5/AOdnxk/lLPKCGFnIZ0cDC4xasliIG+Azis I8Jc/+JgEQ3YY5caNWJL7wq0TM2u+X4/tk75faldFQYoTzDN/KhR3zofjUL2d6L7At3d X+GnEtVng1gx+oprSTGa0Ld+EXcr27cppv85pYsbnageXfH5sSRHuULMncdH9rAHuuBK nJX8mIfDlXmt7J7PHfGPPXbaxX+nsaDvZM/xsd12uLgcfeyF4FQGAO+3rLGym8oiBe9H zvPd4VyxjoLVFdNnJMIdI88z3let8Y37X0t8v8FjOrqbSbX+nMMfg6pkaaAZ1ykeQgTW BB1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RGN0Kvax; 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 s3si10575380edx.251.2021.03.09.12.41.21; Tue, 09 Mar 2021 12:41:50 -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=RGN0Kvax; 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 S231753AbhCIUks (ORCPT + 99 others); Tue, 9 Mar 2021 15:40:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:31365 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231907AbhCIUk0 (ORCPT ); Tue, 9 Mar 2021 15:40:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615322425; 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=Gi63ugnu00FzCPzKu85LuhP3jDhGaWx5Wdxx54aMeeI=; b=RGN0KvaxZYaYfRHVL/py0ILMzm4uK5ZF8BuxcKjHVdrL+1uCoyZVBLpIQGtv5urdpWVzll 3JtEFXcV9XekKrcNxZYtjJL9P3SQ3XArhFwxj2I2XeWcTAc+706u9mwK1c3sv3KSwBrzjA f8K8puijOVLA+rrwGFpSN9osAxPGeBk= 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-373-De7M8teNPHuElZOwUE9UrA-1; Tue, 09 Mar 2021 15:40:23 -0500 X-MC-Unique: De7M8teNPHuElZOwUE9UrA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9ED221074644; Tue, 9 Mar 2021 20:40:22 +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 7CFAA1037E81; Tue, 9 Mar 2021 20:40:22 +0000 (UTC) Received: by aion.usersys.redhat.com (Postfix, from userid 1000) id 82A561A003C; Tue, 9 Mar 2021 15:40:21 -0500 (EST) Date: Tue, 9 Mar 2021 15:40:21 -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: <20210309204021.GG2597609@aion.usersys.redhat.com> References: <20210309144127.57833-1-olga.kornievskaia@gmail.com> <20210309194519.GF2597609@aion.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 02:45:19PM -0500, Scott Mayhew wrote: > > 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? > > Oh, thanks for the history. > > My knee-jerk reaction is: that sounds like a recall-specific issue, so > maybe that logic should be in nfsd4_cb_recall_done? > > I guess I'm OK continuing instead to enumerate transport-layer errors in > nfsd4_cb_done, but do we know that EACCES makes it a complete list? No idea. I'm pretty sure EIO and ETIMEDOUT were the two errors that I was seeing at the time. I don't remember the exact test case but I think I was hammering the server trying to reproduce seq misordered & false retry errors. And EACCES is what Olga's seeing when the server uses the wrong principal for the callback cred. -Scott > > --b. > > > > > -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 > > > > > > >