[pnfs] [PATCH 03/29] pnfs: nfs4_async_handle_error for data server
Benny Halevy
bhalevy at panasas.com
Fri Dec 28 03:44:14 EST 2007
From: Andy Adamson <andros at umich.edu>
It does not make sense for the pNFS filelayout data servers which are not
mounted, and use the MDS struct nfs_server for all bookkeeping.
The filelayout data servers use struct nfs_client to reference the
struct nfs4_session, and have no associated struct nfs_server.
For data server nfs4_async_handle_error calls the nfs_server parameter will
be the MDS nfs_server structure. This is OK because the server struct is
only used on NFS_DELAY errors which are not allowed (yet!) on data server
communication.
This interface will be used in subsequent patches that implement the
filelayout I/O.
Signed-off-by: Andy Adamson<andros at umich.edu>
Signed-off-by: Benny Halevy <bhalevy at panasas.com>
---
fs/nfs/nfs4proc.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index a17b3d1..e6d406d 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3412,14 +3412,22 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server,
case -NFS4ERR_RETRY_UNCACHED_REP:
case -NFS4ERR_TOO_MANY_OPS:
case -NFS4ERR_OP_NOT_IN_SESSION:
+ {
+ struct nfs4_session *session = server->session;
+
+#ifdef CONFIG_PNFS
+ if (clp->cl_ds_session)
+ session = clp->cl_ds_session;
+#endif /* CONFIG_PNFS */
/* FIXME:
ret = nfs41_recover_session_async(task, server);
if (ret)
return ret;
*/
- nfs41_set_session_expired(server->session);
+ nfs41_set_session_expired(session);
task->tk_status = 0;
return -EAGAIN;
+ }
#endif /* CONFIG_NFS_V4_1 */
case -NFS4ERR_DELAY:
nfs_inc_server_stats((struct nfs_server *) server,
--
1.5.3.3
More information about the pNFS
mailing list