diff options
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r-- | fs/nfs/pnfs.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 5f205d31d96c..f38813a0a295 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
@@ -895,6 +895,30 @@ pnfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, struct inode *inode) | |||
895 | pgio->pg_test = (ld && ld->pg_test) ? pnfs_write_pg_test : NULL; | 895 | pgio->pg_test = (ld && ld->pg_test) ? pnfs_write_pg_test : NULL; |
896 | } | 896 | } |
897 | 897 | ||
898 | enum pnfs_try_status | ||
899 | pnfs_try_to_write_data(struct nfs_write_data *wdata, | ||
900 | const struct rpc_call_ops *call_ops, int how) | ||
901 | { | ||
902 | struct inode *inode = wdata->inode; | ||
903 | enum pnfs_try_status trypnfs; | ||
904 | struct nfs_server *nfss = NFS_SERVER(inode); | ||
905 | |||
906 | wdata->mds_ops = call_ops; | ||
907 | |||
908 | dprintk("%s: Writing ino:%lu %u@%llu (how %d)\n", __func__, | ||
909 | inode->i_ino, wdata->args.count, wdata->args.offset, how); | ||
910 | |||
911 | trypnfs = nfss->pnfs_curr_ld->write_pagelist(wdata, how); | ||
912 | if (trypnfs == PNFS_NOT_ATTEMPTED) { | ||
913 | put_lseg(wdata->lseg); | ||
914 | wdata->lseg = NULL; | ||
915 | } else | ||
916 | nfs_inc_stats(inode, NFSIOS_PNFS_WRITE); | ||
917 | |||
918 | dprintk("%s End (trypnfs:%d)\n", __func__, trypnfs); | ||
919 | return trypnfs; | ||
920 | } | ||
921 | |||
898 | /* | 922 | /* |
899 | * Call the appropriate parallel I/O subsystem read function. | 923 | * Call the appropriate parallel I/O subsystem read function. |
900 | */ | 924 | */ |