aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 77966ecb0a2c..86c154bad5db 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -30,6 +30,7 @@
30#include <linux/nfs_fs.h> 30#include <linux/nfs_fs.h>
31#include "internal.h" 31#include "internal.h"
32#include "pnfs.h" 32#include "pnfs.h"
33#include "iostat.h"
33 34
34#define NFSDBG_FACILITY NFSDBG_PNFS 35#define NFSDBG_FACILITY NFSDBG_PNFS
35 36
@@ -880,6 +881,33 @@ pnfs_pageio_init_read(struct nfs_pageio_descriptor *pgio, struct inode *inode)
880} 881}
881 882
882/* 883/*
884 * Call the appropriate parallel I/O subsystem read function.
885 */
886enum pnfs_try_status
887pnfs_try_to_read_data(struct nfs_read_data *rdata,
888 const struct rpc_call_ops *call_ops)
889{
890 struct inode *inode = rdata->inode;
891 struct nfs_server *nfss = NFS_SERVER(inode);
892 enum pnfs_try_status trypnfs;
893
894 rdata->mds_ops = call_ops;
895
896 dprintk("%s: Reading ino:%lu %u@%llu\n",
897 __func__, inode->i_ino, rdata->args.count, rdata->args.offset);
898
899 trypnfs = nfss->pnfs_curr_ld->read_pagelist(rdata);
900 if (trypnfs == PNFS_NOT_ATTEMPTED) {
901 put_lseg(rdata->lseg);
902 rdata->lseg = NULL;
903 } else {
904 nfs_inc_stats(inode, NFSIOS_PNFS_READ);
905 }
906 dprintk("%s End (trypnfs:%d)\n", __func__, trypnfs);
907 return trypnfs;
908}
909
910/*
883 * Device ID cache. Currently supports one layout type per struct nfs_client. 911 * Device ID cache. Currently supports one layout type per struct nfs_client.
884 * Add layout type to the lookup key to expand to support multiple types. 912 * Add layout type to the lookup key to expand to support multiple types.
885 */ 913 */