diff options
author | Fred Isaman <iisaman@netapp.com> | 2012-04-20 14:47:51 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-04-27 14:10:38 -0400 |
commit | 584aa810b6240d88c28113a90c5029449814a3b5 (patch) | |
tree | 694b0942747c9ee7b8f53f21cb81ddc32cc07bbb /fs/nfs/pagelist.c | |
parent | 1825a0d08f22463e5a8f4b1636473efd057a3479 (diff) |
NFS: rewrite directio read to use async coalesce code
This also has the advantage that it allows directio to use pnfs.
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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 638ca7f5a1e4..33a21ca9b84b 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
@@ -48,8 +48,11 @@ void nfs_pgheader_init(struct nfs_pageio_descriptor *desc, | |||
48 | hdr->cred = hdr->req->wb_context->cred; | 48 | hdr->cred = hdr->req->wb_context->cred; |
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->dreq = desc->pg_dreq; | ||
51 | hdr->release = release; | 52 | hdr->release = release; |
52 | hdr->completion_ops = desc->pg_completion_ops; | 53 | hdr->completion_ops = desc->pg_completion_ops; |
54 | if (hdr->completion_ops->init_hdr) | ||
55 | hdr->completion_ops->init_hdr(hdr); | ||
53 | } | 56 | } |
54 | 57 | ||
55 | void nfs_set_pgio_error(struct nfs_pgio_header *hdr, int error, loff_t pos) | 58 | void nfs_set_pgio_error(struct nfs_pgio_header *hdr, int error, loff_t pos) |
@@ -116,9 +119,6 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode, | |||
116 | req->wb_page = page; | 119 | req->wb_page = page; |
117 | req->wb_index = page->index; | 120 | req->wb_index = page->index; |
118 | page_cache_get(page); | 121 | page_cache_get(page); |
119 | BUG_ON(PagePrivate(page)); | ||
120 | BUG_ON(!PageLocked(page)); | ||
121 | BUG_ON(page->mapping->host != inode); | ||
122 | req->wb_offset = offset; | 122 | req->wb_offset = offset; |
123 | req->wb_pgbase = offset; | 123 | req->wb_pgbase = offset; |
124 | req->wb_bytes = count; | 124 | req->wb_bytes = count; |
@@ -257,6 +257,7 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc, | |||
257 | desc->pg_ioflags = io_flags; | 257 | desc->pg_ioflags = io_flags; |
258 | desc->pg_error = 0; | 258 | desc->pg_error = 0; |
259 | desc->pg_lseg = NULL; | 259 | desc->pg_lseg = NULL; |
260 | desc->pg_dreq = NULL; | ||
260 | } | 261 | } |
261 | 262 | ||
262 | /** | 263 | /** |