aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/pagelist.c
diff options
context:
space:
mode:
authorFred Isaman <iisaman@netapp.com>2012-04-20 14:47:48 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-04-27 14:10:38 -0400
commit061ae2edb7375ab6776468b075da71008a098b55 (patch)
treea34f25d4d85d90a196b058b879eef3ba374f6d16 /fs/nfs/pagelist.c
parent6c75dc0d498caa402fb17b1bf769835a9db875c8 (diff)
NFS: create completion structure to pass into page_init functions
Factors out the code that will need to change when directio starts using these code paths. This will allow directio to use the generic pagein and flush routines Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r--fs/nfs/pagelist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index cd4c038135a7..4cf2a68493e0 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -49,6 +49,7 @@ void nfs_pgheader_init(struct nfs_pageio_descriptor *desc,
49 hdr->io_start = req_offset(hdr->req); 49 hdr->io_start = req_offset(hdr->req);
50 hdr->good_bytes = desc->pg_count; 50 hdr->good_bytes = desc->pg_count;
51 hdr->release = release; 51 hdr->release = release;
52 hdr->completion_ops = desc->pg_completion_ops;
52} 53}
53 54
54void nfs_set_pgio_error(struct nfs_pgio_header *hdr, int error, loff_t pos) 55void nfs_set_pgio_error(struct nfs_pgio_header *hdr, int error, loff_t pos)
@@ -240,6 +241,7 @@ EXPORT_SYMBOL_GPL(nfs_generic_pg_test);
240void nfs_pageio_init(struct nfs_pageio_descriptor *desc, 241void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
241 struct inode *inode, 242 struct inode *inode,
242 const struct nfs_pageio_ops *pg_ops, 243 const struct nfs_pageio_ops *pg_ops,
244 const struct nfs_pgio_completion_ops *compl_ops,
243 size_t bsize, 245 size_t bsize,
244 int io_flags) 246 int io_flags)
245{ 247{
@@ -252,6 +254,7 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
252 desc->pg_recoalesce = 0; 254 desc->pg_recoalesce = 0;
253 desc->pg_inode = inode; 255 desc->pg_inode = inode;
254 desc->pg_ops = pg_ops; 256 desc->pg_ops = pg_ops;
257 desc->pg_completion_ops = compl_ops;
255 desc->pg_ioflags = io_flags; 258 desc->pg_ioflags = io_flags;
256 desc->pg_error = 0; 259 desc->pg_error = 0;
257 desc->pg_lseg = NULL; 260 desc->pg_lseg = NULL;