aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4filelayout.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2012-04-27 17:53:44 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-19 17:54:19 -0400
commit9f0ec176b3071e0472582c07ae1e68055b28184d (patch)
treea767381b136e8ac9f7839917b477fd7cd8cf9dc3 /fs/nfs/nfs4filelayout.c
parent90fecfcb3437dfc9bec4ee3306584dcd6843701b (diff)
NFSv4.1 set RPC_TASK_SOFTCONN for filelayout DS RPC calls
RPC_TASK_SOFTCONN returns connection errors to the caller which allows the pNFS file layout to quickly try the MDS or perhaps another DS. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r--fs/nfs/nfs4filelayout.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index b9edc887056..0db8c078303 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -401,7 +401,7 @@ filelayout_read_pagelist(struct nfs_read_data *data)
401 401
402 /* Perform an asynchronous read to ds */ 402 /* Perform an asynchronous read to ds */
403 status = nfs_initiate_read(ds->ds_clp->cl_rpcclient, data, 403 status = nfs_initiate_read(ds->ds_clp->cl_rpcclient, data,
404 &filelayout_read_call_ops); 404 &filelayout_read_call_ops, RPC_TASK_SOFTCONN);
405 BUG_ON(status != 0); 405 BUG_ON(status != 0);
406 return PNFS_ATTEMPTED; 406 return PNFS_ATTEMPTED;
407} 407}
@@ -441,7 +441,8 @@ filelayout_write_pagelist(struct nfs_write_data *data, int sync)
441 441
442 /* Perform an asynchronous write */ 442 /* Perform an asynchronous write */
443 status = nfs_initiate_write(ds->ds_clp->cl_rpcclient, data, 443 status = nfs_initiate_write(ds->ds_clp->cl_rpcclient, data,
444 &filelayout_write_call_ops, sync); 444 &filelayout_write_call_ops, sync,
445 RPC_TASK_SOFTCONN);
445 BUG_ON(status != 0); 446 BUG_ON(status != 0);
446 return PNFS_ATTEMPTED; 447 return PNFS_ATTEMPTED;
447} 448}
@@ -966,7 +967,8 @@ static int filelayout_initiate_commit(struct nfs_commit_data *data, int how)
966 if (fh) 967 if (fh)
967 data->args.fh = fh; 968 data->args.fh = fh;
968 return nfs_initiate_commit(ds->ds_clp->cl_rpcclient, data, 969 return nfs_initiate_commit(ds->ds_clp->cl_rpcclient, data,
969 &filelayout_commit_call_ops, how); 970 &filelayout_commit_call_ops, how,
971 RPC_TASK_SOFTCONN);
970} 972}
971 973
972static int 974static int
@@ -1120,7 +1122,7 @@ filelayout_commit_pagelist(struct inode *inode, struct list_head *mds_pages,
1120 if (!data->lseg) { 1122 if (!data->lseg) {
1121 nfs_init_commit(data, mds_pages, NULL, cinfo); 1123 nfs_init_commit(data, mds_pages, NULL, cinfo);
1122 nfs_initiate_commit(NFS_CLIENT(inode), data, 1124 nfs_initiate_commit(NFS_CLIENT(inode), data,
1123 data->mds_ops, how); 1125 data->mds_ops, how, 0);
1124 } else { 1126 } else {
1125 struct pnfs_commit_bucket *buckets; 1127 struct pnfs_commit_bucket *buckets;
1126 1128