aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r--fs/nfs/read.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 473bba35a2cb..9e426cc179ed 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -51,10 +51,10 @@ struct nfs_read_header *nfs_readhdr_alloc(void)
51} 51}
52EXPORT_SYMBOL_GPL(nfs_readhdr_alloc); 52EXPORT_SYMBOL_GPL(nfs_readhdr_alloc);
53 53
54static struct nfs_read_data *nfs_readdata_alloc(struct nfs_pgio_header *hdr, 54static struct nfs_pgio_data *nfs_readdata_alloc(struct nfs_pgio_header *hdr,
55 unsigned int pagecount) 55 unsigned int pagecount)
56{ 56{
57 struct nfs_read_data *data, *prealloc; 57 struct nfs_pgio_data *data, *prealloc;
58 58
59 prealloc = &container_of(hdr, struct nfs_read_header, header)->rpc_data; 59 prealloc = &container_of(hdr, struct nfs_read_header, header)->rpc_data;
60 if (prealloc->header == NULL) 60 if (prealloc->header == NULL)
@@ -84,7 +84,7 @@ void nfs_readhdr_free(struct nfs_pgio_header *hdr)
84} 84}
85EXPORT_SYMBOL_GPL(nfs_readhdr_free); 85EXPORT_SYMBOL_GPL(nfs_readhdr_free);
86 86
87void nfs_readdata_release(struct nfs_read_data *rdata) 87void nfs_readdata_release(struct nfs_pgio_data *rdata)
88{ 88{
89 struct nfs_pgio_header *hdr = rdata->header; 89 struct nfs_pgio_header *hdr = rdata->header;
90 struct nfs_read_header *read_header = container_of(hdr, struct nfs_read_header, header); 90 struct nfs_read_header *read_header = container_of(hdr, struct nfs_read_header, header);
@@ -212,7 +212,7 @@ out:
212} 212}
213 213
214int nfs_initiate_read(struct rpc_clnt *clnt, 214int nfs_initiate_read(struct rpc_clnt *clnt,
215 struct nfs_read_data *data, 215 struct nfs_pgio_data *data,
216 const struct rpc_call_ops *call_ops, int flags) 216 const struct rpc_call_ops *call_ops, int flags)
217{ 217{
218 struct inode *inode = data->header->inode; 218 struct inode *inode = data->header->inode;
@@ -255,7 +255,7 @@ EXPORT_SYMBOL_GPL(nfs_initiate_read);
255/* 255/*
256 * Set up the NFS read request struct 256 * Set up the NFS read request struct
257 */ 257 */
258static void nfs_read_rpcsetup(struct nfs_read_data *data, 258static void nfs_read_rpcsetup(struct nfs_pgio_data *data,
259 unsigned int count, unsigned int offset) 259 unsigned int count, unsigned int offset)
260{ 260{
261 struct nfs_page *req = data->header->req; 261 struct nfs_page *req = data->header->req;
@@ -274,7 +274,7 @@ static void nfs_read_rpcsetup(struct nfs_read_data *data,
274 nfs_fattr_init(&data->fattr); 274 nfs_fattr_init(&data->fattr);
275} 275}
276 276
277static int nfs_do_read(struct nfs_read_data *data, 277static int nfs_do_read(struct nfs_pgio_data *data,
278 const struct rpc_call_ops *call_ops) 278 const struct rpc_call_ops *call_ops)
279{ 279{
280 struct inode *inode = data->header->inode; 280 struct inode *inode = data->header->inode;
@@ -286,13 +286,13 @@ static int
286nfs_do_multiple_reads(struct list_head *head, 286nfs_do_multiple_reads(struct list_head *head,
287 const struct rpc_call_ops *call_ops) 287 const struct rpc_call_ops *call_ops)
288{ 288{
289 struct nfs_read_data *data; 289 struct nfs_pgio_data *data;
290 int ret = 0; 290 int ret = 0;
291 291
292 while (!list_empty(head)) { 292 while (!list_empty(head)) {
293 int ret2; 293 int ret2;
294 294
295 data = list_first_entry(head, struct nfs_read_data, list); 295 data = list_first_entry(head, struct nfs_pgio_data, list);
296 list_del_init(&data->list); 296 list_del_init(&data->list);
297 297
298 ret2 = nfs_do_read(data, call_ops); 298 ret2 = nfs_do_read(data, call_ops);
@@ -324,8 +324,8 @@ static void nfs_pagein_error(struct nfs_pageio_descriptor *desc,
324{ 324{
325 set_bit(NFS_IOHDR_REDO, &hdr->flags); 325 set_bit(NFS_IOHDR_REDO, &hdr->flags);
326 while (!list_empty(&hdr->rpc_list)) { 326 while (!list_empty(&hdr->rpc_list)) {
327 struct nfs_read_data *data = list_first_entry(&hdr->rpc_list, 327 struct nfs_pgio_data *data = list_first_entry(&hdr->rpc_list,
328 struct nfs_read_data, list); 328 struct nfs_pgio_data, list);
329 list_del(&data->list); 329 list_del(&data->list);
330 nfs_readdata_release(data); 330 nfs_readdata_release(data);
331 } 331 }
@@ -350,7 +350,7 @@ static int nfs_pagein_multi(struct nfs_pageio_descriptor *desc,
350{ 350{
351 struct nfs_page *req = hdr->req; 351 struct nfs_page *req = hdr->req;
352 struct page *page = req->wb_page; 352 struct page *page = req->wb_page;
353 struct nfs_read_data *data; 353 struct nfs_pgio_data *data;
354 size_t rsize = desc->pg_bsize, nbytes; 354 size_t rsize = desc->pg_bsize, nbytes;
355 unsigned int offset; 355 unsigned int offset;
356 356
@@ -382,7 +382,7 @@ static int nfs_pagein_one(struct nfs_pageio_descriptor *desc,
382{ 382{
383 struct nfs_page *req; 383 struct nfs_page *req;
384 struct page **pages; 384 struct page **pages;
385 struct nfs_read_data *data; 385 struct nfs_pgio_data *data;
386 struct list_head *head = &desc->pg_list; 386 struct list_head *head = &desc->pg_list;
387 387
388 data = nfs_readdata_alloc(hdr, nfs_page_array_len(desc->pg_base, 388 data = nfs_readdata_alloc(hdr, nfs_page_array_len(desc->pg_base,
@@ -447,7 +447,7 @@ static const struct nfs_pageio_ops nfs_pageio_read_ops = {
447 * This is the callback from RPC telling us whether a reply was 447 * This is the callback from RPC telling us whether a reply was
448 * received or some error occurred (timeout or socket shutdown). 448 * received or some error occurred (timeout or socket shutdown).
449 */ 449 */
450int nfs_readpage_result(struct rpc_task *task, struct nfs_read_data *data) 450int nfs_readpage_result(struct rpc_task *task, struct nfs_pgio_data *data)
451{ 451{
452 struct inode *inode = data->header->inode; 452 struct inode *inode = data->header->inode;
453 int status; 453 int status;
@@ -468,7 +468,7 @@ int nfs_readpage_result(struct rpc_task *task, struct nfs_read_data *data)
468 return 0; 468 return 0;
469} 469}
470 470
471static void nfs_readpage_retry(struct rpc_task *task, struct nfs_read_data *data) 471static void nfs_readpage_retry(struct rpc_task *task, struct nfs_pgio_data *data)
472{ 472{
473 struct nfs_pgio_args *argp = &data->args; 473 struct nfs_pgio_args *argp = &data->args;
474 struct nfs_pgio_res *resp = &data->res; 474 struct nfs_pgio_res *resp = &data->res;
@@ -490,7 +490,7 @@ static void nfs_readpage_retry(struct rpc_task *task, struct nfs_read_data *data
490 490
491static void nfs_readpage_result_common(struct rpc_task *task, void *calldata) 491static void nfs_readpage_result_common(struct rpc_task *task, void *calldata)
492{ 492{
493 struct nfs_read_data *data = calldata; 493 struct nfs_pgio_data *data = calldata;
494 struct nfs_pgio_header *hdr = data->header; 494 struct nfs_pgio_header *hdr = data->header;
495 495
496 /* Note the only returns of nfs_readpage_result are 0 and -EAGAIN */ 496 /* Note the only returns of nfs_readpage_result are 0 and -EAGAIN */
@@ -520,7 +520,7 @@ static void nfs_readpage_release_common(void *calldata)
520 520
521void nfs_read_prepare(struct rpc_task *task, void *calldata) 521void nfs_read_prepare(struct rpc_task *task, void *calldata)
522{ 522{
523 struct nfs_read_data *data = calldata; 523 struct nfs_pgio_data *data = calldata;
524 int err; 524 int err;
525 err = NFS_PROTO(data->header->inode)->read_rpc_prepare(task, data); 525 err = NFS_PROTO(data->header->inode)->read_rpc_prepare(task, data);
526 if (err) 526 if (err)