All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Olga Kornievskaia <olga.kornievskaia@gmail.com>
Cc: Bruce Fields <bfields@redhat.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v3 1/1] NFSD: fix error handling in NFSv4.0 callbacks
Date: Tue, 9 Mar 2021 19:23:13 +0000	[thread overview]
Message-ID: <EAC51290-2EB8-4FE1-BD37-AE035D7BCB6C@oracle.com> (raw)
In-Reply-To: <20210309182337.62308-1-olga.kornievskaia@gmail.com>



> On Mar 9, 2021, at 1:23 PM, Olga Kornievskaia <olga.kornievskaia@gmail.com> wrote:
> 
> If the server's attempts at sending a callback request fails either due
> to connection or authentication issues, the server needs to set
> NFS4ERR_CB_PATH_DOWN in response to RENEW so that client can recover.
> 
> Suggested-by: Bruce Fields <bfields@redhat.com>
> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
> ---
> fs/nfsd/nfs4callback.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> index 052be5bf9ef5..f436d2ca5223 100644
> --- a/fs/nfsd/nfs4callback.c
> +++ b/fs/nfsd/nfs4callback.c
> @@ -1186,11 +1186,8 @@ static void nfsd4_cb_done(struct rpc_task *task, void *calldata)
> 		rpc_restart_call_prepare(task);
> 		return;
> 	case 1:
> -		switch (task->tk_status) {
> -		case -EIO:
> -		case -ETIMEDOUT:
> +		if (task->tk_status)

Can task->tk_status ever be positive here? Wondering if we want
a more explicit check like: (task->tk_status < 0)


> 			nfsd4_mark_cb_down(clp, task->tk_status);
> -		}
> 		break;
> 	default:
> 		BUG();
> -- 
> 2.27.0
> 

--
Chuck Lever




      reply	other threads:[~2021-03-09 19:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 18:23 [PATCH v3 1/1] NFSD: fix error handling in NFSv4.0 callbacks Olga Kornievskaia
2021-03-09 19:23 ` Chuck Lever [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EAC51290-2EB8-4FE1-BD37-AE035D7BCB6C@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=bfields@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=olga.kornievskaia@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.