public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas.com>
To: andros@netapp.com
Cc: pnfs@linux-nfs.org, linux-nfs@vger.kernel.org
Subject: Re: [pnfs] [PATCH 1/2] pnfs: fix-multiple-free-slot-calls
Date: Tue, 03 Nov 2009 08:24:03 +0200	[thread overview]
Message-ID: <4AEFCC83.7050506@panasas.com> (raw)
In-Reply-To: <1256217343-6991-2-git-send-email-andros@netapp.com>

Merged. Thanks!

Benny

On Oct. 22, 2009, 15:15 +0200, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
> 
> Use _nfs4_async_handle_error and pass in either the MDS or DS client
> 
> Reported-by: Trond Myklebust <trond.myklebust@netapp.com>
> 
> nfs41_sequence_free_slot is called multiple times on SEQUENCE operation errors.
> 
> Fix this by moving the call to nfs41_sequence_free_slot from the error path of
> nfs41_sequence_done to nfs4_async_handle_error for the SEQUENCE operation
> error cases.
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> .
> ---
>  fs/nfs/nfs4proc.c |   12 +++++++++---
>  1 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index c6abb45..72314c2 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -70,6 +70,9 @@ static int _nfs4_proc_open(struct nfs4_opendata *data);
>  static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *);
>  static int nfs4_async_handle_error(struct rpc_task *, const struct nfs_server *,
>  			 struct nfs4_state *, struct nfs4_sequence_res *);
> +static int _nfs4_async_handle_error(struct rpc_task *,
> +			const struct nfs_server *, struct nfs_client *,
> +			struct nfs4_state *, struct nfs4_sequence_res *);
>  static int _nfs4_proc_lookup(struct inode *dir, const struct qstr *name, struct nfs_fh *fhandle, struct nfs_fattr *fattr);
>  static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fattr *fattr);
>  
> @@ -3045,7 +3048,8 @@ static int pnfs4_read_done(struct rpc_task *task, struct nfs_read_data *data)
>  
>  	/* FIXME: pass data->args.context->state to nfs4_async_handle_error
>  	   like in nfs4_read_done? */
> -	if (nfs4_async_handle_error(task, mds_svr, NULL) == -EAGAIN) {
> +	if (_nfs4_async_handle_error(task, NULL, client, NULL,
> +					&data->res.seq_res) == -EAGAIN) {
>  		nfs4_restart_rpc(task, client);
>  		dprintk("<-- %s status= %d\n", __func__, -EAGAIN);
>  		return -EAGAIN;
> @@ -3085,7 +3089,8 @@ static int pnfs4_write_done(struct rpc_task *task, struct nfs_write_data *data)
>  	*/
>  	/* FIXME: pass data->args.context->state to nfs4_async_handle_error
>  	   like in nfs4_write_done? */
> -	if (nfs4_async_handle_error(task, mds_svr, NULL) == -EAGAIN) {
> +	if (_nfs4_async_handle_error(task, NULL, client, NULL,
> +					&data->res.seq_res) == -EAGAIN) {
>  		nfs4_restart_rpc(task, client);
>  		dprintk("<-- %s status= %d\n", __func__, -EAGAIN);
>  		return -EAGAIN;
> @@ -3133,7 +3138,8 @@ static int pnfs4_commit_done(struct rpc_task *task, struct nfs_write_data *data)
>  
>  	nfs41_sequence_done(client, &data->res.seq_res, task->tk_status);
>  
> -	if (nfs4_async_handle_error(task, mds_svr, NULL) == -EAGAIN) {
> +	if (_nfs4_async_handle_error(task, NULL, client, NULL,
> +					&data->res.seq_res) == -EAGAIN) {
>  		nfs4_restart_rpc(task, client);
>  		return -EAGAIN;
>  	}

      parent reply	other threads:[~2009-11-03  6:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1256217343-6991-1-git-send-email-andros@netapp.com>
2009-10-22 13:15 ` [PATCH 1/2] pnfs: fix-multiple-free-slot-calls andros
2009-10-22 13:15   ` [PATCH 2/2] pnfs: fix pnfs_commit update_layout range andros
2009-11-03  6:24     ` [pnfs] " Benny Halevy
2009-11-03  6:24   ` Benny Halevy [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=4AEFCC83.7050506@panasas.com \
    --to=bhalevy@panasas.com \
    --cc=andros@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=pnfs@linux-nfs.org \
    /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