public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Mi Jinlong <mijinlong@cn.fujitsu.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
	Chuck Lever <chuck.lever@oracle.com>,
	NFSv3 list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] Fix bug nfslock request sending fail will be process as blocked
Date: Fri, 12 Mar 2010 08:42:09 -0500	[thread overview]
Message-ID: <1268401329.3156.12.camel@localhost.localdomain> (raw)
In-Reply-To: <4B9A14A1.3000008@cn.fujitsu.com>

On Fri, 2010-03-12 at 18:17 +0800, Mi Jinlong wrote: 
> If local reason cause nfslock request send fail(means status < 0,
> resp->status not be reset), the request will be process as blocked 
> at first now.
> 
> This patch initialize resp->status to nlm_lck_denied_nolocks, it 
> can make the following process correctly.
> 
> Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
> ---
>  fs/lockd/clntproc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
> index c81249f..a631582 100644
> --- a/fs/lockd/clntproc.c
> +++ b/fs/lockd/clntproc.c
> @@ -535,7 +535,7 @@ again:
>  	 * Initialise resp->status to a valid non-zero value,
>  	 * since 0 == nlm_lck_granted
>  	 */
> -	resp->status = nlm_lck_blocked;
> +	resp->status = nlm_lck_denied_nolocks;
>  	for(;;) {
>  		/* Reboot protection */
>  		fl->fl_u.nfs_fl.state = host->h_state;

We _want_ to process it as being blocked if the RPC call was
interrupted. The above patch will cause the client to just abandon the
interrupted lock request without sending the CANCEL request...

Trond


  reply	other threads:[~2010-03-12 13:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12 10:17 [PATCH] Fix bug nfslock request sending fail will be process as blocked Mi Jinlong
2010-03-12 13:42 ` Trond Myklebust [this message]
     [not found]   ` <1268401329.3156.12.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-16 10:20     ` Mi Jinlong
2010-03-16 13:12       ` Trond Myklebust
     [not found]         ` <1268745162.3155.17.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-17 10:03           ` Mi Jinlong

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=1268401329.3156.12.camel@localhost.localdomain \
    --to=trond.myklebust@fys.uio.no \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=mijinlong@cn.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox