summaryrefslogtreecommitdiff
path: root/fs/nfs/read.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2012-04-28 01:53:44 +0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-20 01:54:19 +0400
commit9f0ec176b3071e0472582c07ae1e68055b28184d (patch)
treea767381b136e8ac9f7839917b477fd7cd8cf9dc3 /fs/nfs/read.c
parent90fecfcb3437dfc9bec4ee3306584dcd6843701b (diff)
downloadlinux-9f0ec176b3071e0472582c07ae1e68055b28184d.tar.xz
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/read.c')
-rw-r--r--fs/nfs/read.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index f23cf255bd39..2cfdd7785411 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -206,7 +206,7 @@ out:
int nfs_initiate_read(struct rpc_clnt *clnt,
struct nfs_read_data *data,
- const struct rpc_call_ops *call_ops)
+ const struct rpc_call_ops *call_ops, int flags)
{
struct inode *inode = data->header->inode;
int swap_flags = IS_SWAPFILE(inode) ? NFS_RPC_SWAPFLAGS : 0;
@@ -223,7 +223,7 @@ int nfs_initiate_read(struct rpc_clnt *clnt,
.callback_ops = call_ops,
.callback_data = data,
.workqueue = nfsiod_workqueue,
- .flags = RPC_TASK_ASYNC | swap_flags,
+ .flags = RPC_TASK_ASYNC | swap_flags | flags,
};
/* Set up the initial task struct. */
@@ -272,7 +272,7 @@ static int nfs_do_read(struct nfs_read_data *data,
{
struct inode *inode = data->header->inode;
- return nfs_initiate_read(NFS_CLIENT(inode), data, call_ops);
+ return nfs_initiate_read(NFS_CLIENT(inode), data, call_ops, 0);
}
static int