From: andros@netapp.com
To: pnfs@linux-nfs.org
Cc: linux-nfs@vger.kernel.org, Andy Adamson <andros@netapp.com>
Subject: [PATCH 1/2] pnfs: fix-multiple-free-slot-calls
Date: Thu, 22 Oct 2009 09:15:42 -0400 [thread overview]
Message-ID: <1256217343-6991-2-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1256217343-6991-1-git-send-email-andros@netapp.com>
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;
}
--
1.6.2.5
next parent reply other threads:[~2009-10-22 13:15 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 ` andros [this message]
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 ` [pnfs] [PATCH 1/2] pnfs: fix-multiple-free-slot-calls Benny Halevy
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=1256217343-6991-2-git-send-email-andros@netapp.com \
--to=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