summaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2011-03-03 16:13:45 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-11 21:38:44 +0100
commit0382b74409c6b9ef12c952b50bb44f557a361a43 (patch)
tree0eebc04006a3b70fb6605c42ee89cdc0ccd8b1cf /fs/nfs/write.c
parentNFSv4.1: trigger LAYOUTGET for writes (diff)
downloadlinux-0382b74409c6b9ef12c952b50bb44f557a361a43.tar.xz
linux-0382b74409c6b9ef12c952b50bb44f557a361a43.zip
NFSv4.1: implement generic pnfs layer write switch
Signed-off-by: Andy Adamson <andros@citi.umich.edu> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Dean Hildebrand <dhildeb@us.ibm.com> Signed-off-by: Fred Isaman <iisaman@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: Mike Sager <sager@netapp.com> Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Tao Guo <guotao@nrchpc.ac.cn> Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 49c4784c24e5..df99c5b0ee65 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -873,6 +873,10 @@ static int nfs_write_rpcsetup(struct nfs_page *req,
data->res.verf = &data->verf;
nfs_fattr_init(&data->fattr);
+ if (data->lseg &&
+ (pnfs_try_to_write_data(data, call_ops, how) == PNFS_ATTEMPTED))
+ return 0;
+
return nfs_initiate_write(data, NFS_CLIENT(inode), call_ops, how);
}