aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@netapp.com>2014-05-06 09:12:26 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-05-28 18:12:47 -0400
commit9c7e1b3d50b56b8d8f6237ed232350b7c6476cd5 (patch)
tree4113ef7dcdbf7b55139f7765d7dc1044d7c0fd83 /fs
parent9137bdf3d241fc2cbeb2a8ced51d1546150aa6a1 (diff)
NFS: Create a common read and write data struct
At this point, the only difference between nfs_read_data and nfs_write_data is the write verifier. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/blocklayout/blocklayout.c22
-rw-r--r--fs/nfs/internal.h10
-rw-r--r--fs/nfs/nfs3proc.c12
-rw-r--r--fs/nfs/nfs4_fs.h4
-rw-r--r--fs/nfs/nfs4filelayout.c34
-rw-r--r--fs/nfs/nfs4proc.c30
-rw-r--r--fs/nfs/nfs4trace.h8
-rw-r--r--fs/nfs/objlayout/objio_osd.c6
-rw-r--r--fs/nfs/objlayout/objlayout.c16
-rw-r--r--fs/nfs/objlayout/objlayout.h8
-rw-r--r--fs/nfs/pnfs.c26
-rw-r--r--fs/nfs/pnfs.h10
-rw-r--r--fs/nfs/proc.c12
-rw-r--r--fs/nfs/read.c32
-rw-r--r--fs/nfs/write.c36
15 files changed, 133 insertions, 133 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 65d849bdf77a..206cc68c9694 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -210,7 +210,7 @@ static void bl_end_io_read(struct bio *bio, int err)
210 SetPageUptodate(bvec->bv_page); 210 SetPageUptodate(bvec->bv_page);
211 211
212 if (err) { 212 if (err) {
213 struct nfs_read_data *rdata = par->data; 213 struct nfs_pgio_data *rdata = par->data;
214 struct nfs_pgio_header *header = rdata->header; 214 struct nfs_pgio_header *header = rdata->header;
215 215
216 if (!header->pnfs_error) 216 if (!header->pnfs_error)
@@ -224,17 +224,17 @@ static void bl_end_io_read(struct bio *bio, int err)
224static void bl_read_cleanup(struct work_struct *work) 224static void bl_read_cleanup(struct work_struct *work)
225{ 225{
226 struct rpc_task *task; 226 struct rpc_task *task;
227 struct nfs_read_data *rdata; 227 struct nfs_pgio_data *rdata;
228 dprintk("%s enter\n", __func__); 228 dprintk("%s enter\n", __func__);
229 task = container_of(work, struct rpc_task, u.tk_work); 229 task = container_of(work, struct rpc_task, u.tk_work);
230 rdata = container_of(task, struct nfs_read_data, task); 230 rdata = container_of(task, struct nfs_pgio_data, task);
231 pnfs_ld_read_done(rdata); 231 pnfs_ld_read_done(rdata);
232} 232}
233 233
234static void 234static void
235bl_end_par_io_read(void *data, int unused) 235bl_end_par_io_read(void *data, int unused)
236{ 236{
237 struct nfs_read_data *rdata = data; 237 struct nfs_pgio_data *rdata = data;
238 238
239 rdata->task.tk_status = rdata->header->pnfs_error; 239 rdata->task.tk_status = rdata->header->pnfs_error;
240 INIT_WORK(&rdata->task.u.tk_work, bl_read_cleanup); 240 INIT_WORK(&rdata->task.u.tk_work, bl_read_cleanup);
@@ -242,7 +242,7 @@ bl_end_par_io_read(void *data, int unused)
242} 242}
243 243
244static enum pnfs_try_status 244static enum pnfs_try_status
245bl_read_pagelist(struct nfs_read_data *rdata) 245bl_read_pagelist(struct nfs_pgio_data *rdata)
246{ 246{
247 struct nfs_pgio_header *header = rdata->header; 247 struct nfs_pgio_header *header = rdata->header;
248 int i, hole; 248 int i, hole;
@@ -390,7 +390,7 @@ static void bl_end_io_write_zero(struct bio *bio, int err)
390 } 390 }
391 391
392 if (unlikely(err)) { 392 if (unlikely(err)) {
393 struct nfs_write_data *data = par->data; 393 struct nfs_pgio_data *data = par->data;
394 struct nfs_pgio_header *header = data->header; 394 struct nfs_pgio_header *header = data->header;
395 395
396 if (!header->pnfs_error) 396 if (!header->pnfs_error)
@@ -405,7 +405,7 @@ static void bl_end_io_write(struct bio *bio, int err)
405{ 405{
406 struct parallel_io *par = bio->bi_private; 406 struct parallel_io *par = bio->bi_private;
407 const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 407 const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
408 struct nfs_write_data *data = par->data; 408 struct nfs_pgio_data *data = par->data;
409 struct nfs_pgio_header *header = data->header; 409 struct nfs_pgio_header *header = data->header;
410 410
411 if (!uptodate) { 411 if (!uptodate) {
@@ -423,10 +423,10 @@ static void bl_end_io_write(struct bio *bio, int err)
423static void bl_write_cleanup(struct work_struct *work) 423static void bl_write_cleanup(struct work_struct *work)
424{ 424{
425 struct rpc_task *task; 425 struct rpc_task *task;
426 struct nfs_write_data *wdata; 426 struct nfs_pgio_data *wdata;
427 dprintk("%s enter\n", __func__); 427 dprintk("%s enter\n", __func__);
428 task = container_of(work, struct rpc_task, u.tk_work); 428 task = container_of(work, struct rpc_task, u.tk_work);
429 wdata = container_of(task, struct nfs_write_data, task); 429 wdata = container_of(task, struct nfs_pgio_data, task);
430 if (likely(!wdata->header->pnfs_error)) { 430 if (likely(!wdata->header->pnfs_error)) {
431 /* Marks for LAYOUTCOMMIT */ 431 /* Marks for LAYOUTCOMMIT */
432 mark_extents_written(BLK_LSEG2EXT(wdata->header->lseg), 432 mark_extents_written(BLK_LSEG2EXT(wdata->header->lseg),
@@ -438,7 +438,7 @@ static void bl_write_cleanup(struct work_struct *work)
438/* Called when last of bios associated with a bl_write_pagelist call finishes */ 438/* Called when last of bios associated with a bl_write_pagelist call finishes */
439static void bl_end_par_io_write(void *data, int num_se) 439static void bl_end_par_io_write(void *data, int num_se)
440{ 440{
441 struct nfs_write_data *wdata = data; 441 struct nfs_pgio_data *wdata = data;
442 442
443 if (unlikely(wdata->header->pnfs_error)) { 443 if (unlikely(wdata->header->pnfs_error)) {
444 bl_free_short_extents(&BLK_LSEG2EXT(wdata->header->lseg)->bl_inval, 444 bl_free_short_extents(&BLK_LSEG2EXT(wdata->header->lseg)->bl_inval,
@@ -673,7 +673,7 @@ check_page:
673} 673}
674 674
675static enum pnfs_try_status 675static enum pnfs_try_status
676bl_write_pagelist(struct nfs_write_data *wdata, int sync) 676bl_write_pagelist(struct nfs_pgio_data *wdata, int sync)
677{ 677{
678 struct nfs_pgio_header *header = wdata->header; 678 struct nfs_pgio_header *header = wdata->header;
679 int i, ret, npg_zero, pg_index, last = 0; 679 int i, ret, npg_zero, pg_index, last = 0;
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 98fe618db2aa..af01b80412dd 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -401,13 +401,13 @@ extern void nfs_pageio_init_read(struct nfs_pageio_descriptor *pgio,
401 struct inode *inode, bool force_mds, 401 struct inode *inode, bool force_mds,
402 const struct nfs_pgio_completion_ops *compl_ops); 402 const struct nfs_pgio_completion_ops *compl_ops);
403extern int nfs_initiate_read(struct rpc_clnt *clnt, 403extern int nfs_initiate_read(struct rpc_clnt *clnt,
404 struct nfs_read_data *data, 404 struct nfs_pgio_data *data,
405 const struct rpc_call_ops *call_ops, int flags); 405 const struct rpc_call_ops *call_ops, int flags);
406extern void nfs_read_prepare(struct rpc_task *task, void *calldata); 406extern void nfs_read_prepare(struct rpc_task *task, void *calldata);
407extern int nfs_generic_pagein(struct nfs_pageio_descriptor *desc, 407extern int nfs_generic_pagein(struct nfs_pageio_descriptor *desc,
408 struct nfs_pgio_header *hdr); 408 struct nfs_pgio_header *hdr);
409extern void nfs_pageio_reset_read_mds(struct nfs_pageio_descriptor *pgio); 409extern void nfs_pageio_reset_read_mds(struct nfs_pageio_descriptor *pgio);
410extern void nfs_readdata_release(struct nfs_read_data *rdata); 410extern void nfs_readdata_release(struct nfs_pgio_data *rdata);
411 411
412/* super.c */ 412/* super.c */
413void nfs_clone_super(struct super_block *, struct nfs_mount_info *); 413void nfs_clone_super(struct super_block *, struct nfs_mount_info *);
@@ -429,10 +429,10 @@ extern void nfs_writehdr_free(struct nfs_pgio_header *hdr);
429extern int nfs_generic_flush(struct nfs_pageio_descriptor *desc, 429extern int nfs_generic_flush(struct nfs_pageio_descriptor *desc,
430 struct nfs_pgio_header *hdr); 430 struct nfs_pgio_header *hdr);
431extern void nfs_pageio_reset_write_mds(struct nfs_pageio_descriptor *pgio); 431extern void nfs_pageio_reset_write_mds(struct nfs_pageio_descriptor *pgio);
432extern void nfs_writedata_release(struct nfs_write_data *wdata); 432extern void nfs_writedata_release(struct nfs_pgio_data *wdata);
433extern void nfs_commit_free(struct nfs_commit_data *p); 433extern void nfs_commit_free(struct nfs_commit_data *p);
434extern int nfs_initiate_write(struct rpc_clnt *clnt, 434extern int nfs_initiate_write(struct rpc_clnt *clnt,
435 struct nfs_write_data *data, 435 struct nfs_pgio_data *data,
436 const struct rpc_call_ops *call_ops, 436 const struct rpc_call_ops *call_ops,
437 int how, int flags); 437 int how, int flags);
438extern void nfs_write_prepare(struct rpc_task *task, void *calldata); 438extern void nfs_write_prepare(struct rpc_task *task, void *calldata);
@@ -492,7 +492,7 @@ static inline void nfs_inode_dio_wait(struct inode *inode)
492extern ssize_t nfs_dreq_bytes_left(struct nfs_direct_req *dreq); 492extern ssize_t nfs_dreq_bytes_left(struct nfs_direct_req *dreq);
493 493
494/* nfs4proc.c */ 494/* nfs4proc.c */
495extern void __nfs4_read_done_cb(struct nfs_read_data *); 495extern void __nfs4_read_done_cb(struct nfs_pgio_data *);
496extern struct nfs_client *nfs4_init_client(struct nfs_client *clp, 496extern struct nfs_client *nfs4_init_client(struct nfs_client *clp,
497 const struct rpc_timeout *timeparms, 497 const struct rpc_timeout *timeparms,
498 const char *ip_addr); 498 const char *ip_addr);
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
index d873241a9b3a..d235369c3dfb 100644
--- a/fs/nfs/nfs3proc.c
+++ b/fs/nfs/nfs3proc.c
@@ -795,7 +795,7 @@ nfs3_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
795 return status; 795 return status;
796} 796}
797 797
798static int nfs3_read_done(struct rpc_task *task, struct nfs_read_data *data) 798static int nfs3_read_done(struct rpc_task *task, struct nfs_pgio_data *data)
799{ 799{
800 struct inode *inode = data->header->inode; 800 struct inode *inode = data->header->inode;
801 801
@@ -807,18 +807,18 @@ static int nfs3_read_done(struct rpc_task *task, struct nfs_read_data *data)
807 return 0; 807 return 0;
808} 808}
809 809
810static void nfs3_proc_read_setup(struct nfs_read_data *data, struct rpc_message *msg) 810static void nfs3_proc_read_setup(struct nfs_pgio_data *data, struct rpc_message *msg)
811{ 811{
812 msg->rpc_proc = &nfs3_procedures[NFS3PROC_READ]; 812 msg->rpc_proc = &nfs3_procedures[NFS3PROC_READ];
813} 813}
814 814
815static int nfs3_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_data *data) 815static int nfs3_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_pgio_data *data)
816{ 816{
817 rpc_call_start(task); 817 rpc_call_start(task);
818 return 0; 818 return 0;
819} 819}
820 820
821static int nfs3_write_done(struct rpc_task *task, struct nfs_write_data *data) 821static int nfs3_write_done(struct rpc_task *task, struct nfs_pgio_data *data)
822{ 822{
823 struct inode *inode = data->header->inode; 823 struct inode *inode = data->header->inode;
824 824
@@ -829,12 +829,12 @@ static int nfs3_write_done(struct rpc_task *task, struct nfs_write_data *data)
829 return 0; 829 return 0;
830} 830}
831 831
832static void nfs3_proc_write_setup(struct nfs_write_data *data, struct rpc_message *msg) 832static void nfs3_proc_write_setup(struct nfs_pgio_data *data, struct rpc_message *msg)
833{ 833{
834 msg->rpc_proc = &nfs3_procedures[NFS3PROC_WRITE]; 834 msg->rpc_proc = &nfs3_procedures[NFS3PROC_WRITE];
835} 835}
836 836
837static int nfs3_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_write_data *data) 837static int nfs3_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_pgio_data *data)
838{ 838{
839 rpc_call_start(task); 839 rpc_call_start(task);
840 return 0; 840 return 0;
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index e1d1badbe53c..f63cb87cd730 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -337,7 +337,7 @@ nfs4_state_protect(struct nfs_client *clp, unsigned long sp4_mode,
337 */ 337 */
338static inline void 338static inline void
339nfs4_state_protect_write(struct nfs_client *clp, struct rpc_clnt **clntp, 339nfs4_state_protect_write(struct nfs_client *clp, struct rpc_clnt **clntp,
340 struct rpc_message *msg, struct nfs_write_data *wdata) 340 struct rpc_message *msg, struct nfs_pgio_data *wdata)
341{ 341{
342 if (_nfs4_state_protect(clp, NFS_SP4_MACH_CRED_WRITE, clntp, msg) && 342 if (_nfs4_state_protect(clp, NFS_SP4_MACH_CRED_WRITE, clntp, msg) &&
343 !test_bit(NFS_SP4_MACH_CRED_COMMIT, &clp->cl_sp4_flags)) 343 !test_bit(NFS_SP4_MACH_CRED_COMMIT, &clp->cl_sp4_flags))
@@ -369,7 +369,7 @@ nfs4_state_protect(struct nfs_client *clp, unsigned long sp4_flags,
369 369
370static inline void 370static inline void
371nfs4_state_protect_write(struct nfs_client *clp, struct rpc_clnt **clntp, 371nfs4_state_protect_write(struct nfs_client *clp, struct rpc_clnt **clntp,
372 struct rpc_message *msg, struct nfs_write_data *wdata) 372 struct rpc_message *msg, struct nfs_pgio_data *wdata)
373{ 373{
374} 374}
375#endif /* CONFIG_NFS_V4_1 */ 375#endif /* CONFIG_NFS_V4_1 */
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index b9a35c05b60f..e6936147ad95 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -84,7 +84,7 @@ filelayout_get_dserver_offset(struct pnfs_layout_segment *lseg, loff_t offset)
84 BUG(); 84 BUG();
85} 85}
86 86
87static void filelayout_reset_write(struct nfs_write_data *data) 87static void filelayout_reset_write(struct nfs_pgio_data *data)
88{ 88{
89 struct nfs_pgio_header *hdr = data->header; 89 struct nfs_pgio_header *hdr = data->header;
90 struct rpc_task *task = &data->task; 90 struct rpc_task *task = &data->task;
@@ -105,7 +105,7 @@ static void filelayout_reset_write(struct nfs_write_data *data)
105 } 105 }
106} 106}
107 107
108static void filelayout_reset_read(struct nfs_read_data *data) 108static void filelayout_reset_read(struct nfs_pgio_data *data)
109{ 109{
110 struct nfs_pgio_header *hdr = data->header; 110 struct nfs_pgio_header *hdr = data->header;
111 struct rpc_task *task = &data->task; 111 struct rpc_task *task = &data->task;
@@ -243,7 +243,7 @@ wait_on_recovery:
243/* NFS_PROTO call done callback routines */ 243/* NFS_PROTO call done callback routines */
244 244
245static int filelayout_read_done_cb(struct rpc_task *task, 245static int filelayout_read_done_cb(struct rpc_task *task,
246 struct nfs_read_data *data) 246 struct nfs_pgio_data *data)
247{ 247{
248 struct nfs_pgio_header *hdr = data->header; 248 struct nfs_pgio_header *hdr = data->header;
249 int err; 249 int err;
@@ -270,7 +270,7 @@ static int filelayout_read_done_cb(struct rpc_task *task,
270 * rfc5661 is not clear about which credential should be used. 270 * rfc5661 is not clear about which credential should be used.
271 */ 271 */
272static void 272static void
273filelayout_set_layoutcommit(struct nfs_write_data *wdata) 273filelayout_set_layoutcommit(struct nfs_pgio_data *wdata)
274{ 274{
275 struct nfs_pgio_header *hdr = wdata->header; 275 struct nfs_pgio_header *hdr = wdata->header;
276 276
@@ -305,7 +305,7 @@ filelayout_reset_to_mds(struct pnfs_layout_segment *lseg)
305 */ 305 */
306static void filelayout_read_prepare(struct rpc_task *task, void *data) 306static void filelayout_read_prepare(struct rpc_task *task, void *data)
307{ 307{
308 struct nfs_read_data *rdata = data; 308 struct nfs_pgio_data *rdata = data;
309 309
310 if (unlikely(test_bit(NFS_CONTEXT_BAD, &rdata->args.context->flags))) { 310 if (unlikely(test_bit(NFS_CONTEXT_BAD, &rdata->args.context->flags))) {
311 rpc_exit(task, -EIO); 311 rpc_exit(task, -EIO);
@@ -317,7 +317,7 @@ static void filelayout_read_prepare(struct rpc_task *task, void *data)
317 rpc_exit(task, 0); 317 rpc_exit(task, 0);
318 return; 318 return;
319 } 319 }
320 rdata->read_done_cb = filelayout_read_done_cb; 320 rdata->pgio_done_cb = filelayout_read_done_cb;
321 321
322 if (nfs41_setup_sequence(rdata->ds_clp->cl_session, 322 if (nfs41_setup_sequence(rdata->ds_clp->cl_session,
323 &rdata->args.seq_args, 323 &rdata->args.seq_args,
@@ -331,7 +331,7 @@ static void filelayout_read_prepare(struct rpc_task *task, void *data)
331 331
332static void filelayout_read_call_done(struct rpc_task *task, void *data) 332static void filelayout_read_call_done(struct rpc_task *task, void *data)
333{ 333{
334 struct nfs_read_data *rdata = data; 334 struct nfs_pgio_data *rdata = data;
335 335
336 dprintk("--> %s task->tk_status %d\n", __func__, task->tk_status); 336 dprintk("--> %s task->tk_status %d\n", __func__, task->tk_status);
337 337
@@ -347,14 +347,14 @@ static void filelayout_read_call_done(struct rpc_task *task, void *data)
347 347
348static void filelayout_read_count_stats(struct rpc_task *task, void *data) 348static void filelayout_read_count_stats(struct rpc_task *task, void *data)
349{ 349{
350 struct nfs_read_data *rdata = data; 350 struct nfs_pgio_data *rdata = data;
351 351
352 rpc_count_iostats(task, NFS_SERVER(rdata->header->inode)->client->cl_metrics); 352 rpc_count_iostats(task, NFS_SERVER(rdata->header->inode)->client->cl_metrics);
353} 353}
354 354
355static void filelayout_read_release(void *data) 355static void filelayout_read_release(void *data)
356{ 356{
357 struct nfs_read_data *rdata = data; 357 struct nfs_pgio_data *rdata = data;
358 struct pnfs_layout_hdr *lo = rdata->header->lseg->pls_layout; 358 struct pnfs_layout_hdr *lo = rdata->header->lseg->pls_layout;
359 359
360 filelayout_fenceme(lo->plh_inode, lo); 360 filelayout_fenceme(lo->plh_inode, lo);
@@ -363,7 +363,7 @@ static void filelayout_read_release(void *data)
363} 363}
364 364
365static int filelayout_write_done_cb(struct rpc_task *task, 365static int filelayout_write_done_cb(struct rpc_task *task,
366 struct nfs_write_data *data) 366 struct nfs_pgio_data *data)
367{ 367{
368 struct nfs_pgio_header *hdr = data->header; 368 struct nfs_pgio_header *hdr = data->header;
369 int err; 369 int err;
@@ -419,7 +419,7 @@ static int filelayout_commit_done_cb(struct rpc_task *task,
419 419
420static void filelayout_write_prepare(struct rpc_task *task, void *data) 420static void filelayout_write_prepare(struct rpc_task *task, void *data)
421{ 421{
422 struct nfs_write_data *wdata = data; 422 struct nfs_pgio_data *wdata = data;
423 423
424 if (unlikely(test_bit(NFS_CONTEXT_BAD, &wdata->args.context->flags))) { 424 if (unlikely(test_bit(NFS_CONTEXT_BAD, &wdata->args.context->flags))) {
425 rpc_exit(task, -EIO); 425 rpc_exit(task, -EIO);
@@ -443,7 +443,7 @@ static void filelayout_write_prepare(struct rpc_task *task, void *data)
443 443
444static void filelayout_write_call_done(struct rpc_task *task, void *data) 444static void filelayout_write_call_done(struct rpc_task *task, void *data)
445{ 445{
446 struct nfs_write_data *wdata = data; 446 struct nfs_pgio_data *wdata = data;
447 447
448 if (test_bit(NFS_IOHDR_REDO, &wdata->header->flags) && 448 if (test_bit(NFS_IOHDR_REDO, &wdata->header->flags) &&
449 task->tk_status == 0) { 449 task->tk_status == 0) {
@@ -457,14 +457,14 @@ static void filelayout_write_call_done(struct rpc_task *task, void *data)
457 457
458static void filelayout_write_count_stats(struct rpc_task *task, void *data) 458static void filelayout_write_count_stats(struct rpc_task *task, void *data)
459{ 459{
460 struct nfs_write_data *wdata = data; 460 struct nfs_pgio_data *wdata = data;
461 461
462 rpc_count_iostats(task, NFS_SERVER(wdata->header->inode)->client->cl_metrics); 462 rpc_count_iostats(task, NFS_SERVER(wdata->header->inode)->client->cl_metrics);
463} 463}
464 464
465static void filelayout_write_release(void *data) 465static void filelayout_write_release(void *data)
466{ 466{
467 struct nfs_write_data *wdata = data; 467 struct nfs_pgio_data *wdata = data;
468 struct pnfs_layout_hdr *lo = wdata->header->lseg->pls_layout; 468 struct pnfs_layout_hdr *lo = wdata->header->lseg->pls_layout;
469 469
470 filelayout_fenceme(lo->plh_inode, lo); 470 filelayout_fenceme(lo->plh_inode, lo);
@@ -529,7 +529,7 @@ static const struct rpc_call_ops filelayout_commit_call_ops = {
529}; 529};
530 530
531static enum pnfs_try_status 531static enum pnfs_try_status
532filelayout_read_pagelist(struct nfs_read_data *data) 532filelayout_read_pagelist(struct nfs_pgio_data *data)
533{ 533{
534 struct nfs_pgio_header *hdr = data->header; 534 struct nfs_pgio_header *hdr = data->header;
535 struct pnfs_layout_segment *lseg = hdr->lseg; 535 struct pnfs_layout_segment *lseg = hdr->lseg;
@@ -575,7 +575,7 @@ filelayout_read_pagelist(struct nfs_read_data *data)
575 575
576/* Perform async writes. */ 576/* Perform async writes. */
577static enum pnfs_try_status 577static enum pnfs_try_status
578filelayout_write_pagelist(struct nfs_write_data *data, int sync) 578filelayout_write_pagelist(struct nfs_pgio_data *data, int sync)
579{ 579{
580 struct nfs_pgio_header *hdr = data->header; 580 struct nfs_pgio_header *hdr = data->header;
581 struct pnfs_layout_segment *lseg = hdr->lseg; 581 struct pnfs_layout_segment *lseg = hdr->lseg;
@@ -600,7 +600,7 @@ filelayout_write_pagelist(struct nfs_write_data *data, int sync)
600 __func__, hdr->inode->i_ino, sync, (size_t) data->args.count, 600 __func__, hdr->inode->i_ino, sync, (size_t) data->args.count,
601 offset, ds->ds_remotestr, atomic_read(&ds->ds_clp->cl_count)); 601 offset, ds->ds_remotestr, atomic_read(&ds->ds_clp->cl_count));
602 602
603 data->write_done_cb = filelayout_write_done_cb; 603 data->pgio_done_cb = filelayout_write_done_cb;
604 atomic_inc(&ds->ds_clp->cl_count); 604 atomic_inc(&ds->ds_clp->cl_count);
605 data->ds_clp = ds->ds_clp; 605 data->ds_clp = ds->ds_clp;
606 fh = nfs4_fl_select_ds_fh(lseg, j); 606 fh = nfs4_fl_select_ds_fh(lseg, j);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 4794ca693367..e793aa91454a 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4033,12 +4033,12 @@ static bool nfs4_error_stateid_expired(int err)
4033 return false; 4033 return false;
4034} 4034}
4035 4035
4036void __nfs4_read_done_cb(struct nfs_read_data *data) 4036void __nfs4_read_done_cb(struct nfs_pgio_data *data)
4037{ 4037{
4038 nfs_invalidate_atime(data->header->inode); 4038 nfs_invalidate_atime(data->header->inode);
4039} 4039}
4040 4040
4041static int nfs4_read_done_cb(struct rpc_task *task, struct nfs_read_data *data) 4041static int nfs4_read_done_cb(struct rpc_task *task, struct nfs_pgio_data *data)
4042{ 4042{
4043 struct nfs_server *server = NFS_SERVER(data->header->inode); 4043 struct nfs_server *server = NFS_SERVER(data->header->inode);
4044 4044
@@ -4068,7 +4068,7 @@ static bool nfs4_read_stateid_changed(struct rpc_task *task,
4068 return true; 4068 return true;
4069} 4069}
4070 4070
4071static int nfs4_read_done(struct rpc_task *task, struct nfs_read_data *data) 4071static int nfs4_read_done(struct rpc_task *task, struct nfs_pgio_data *data)
4072{ 4072{
4073 4073
4074 dprintk("--> %s\n", __func__); 4074 dprintk("--> %s\n", __func__);
@@ -4077,19 +4077,19 @@ static int nfs4_read_done(struct rpc_task *task, struct nfs_read_data *data)
4077 return -EAGAIN; 4077 return -EAGAIN;
4078 if (nfs4_read_stateid_changed(task, &data->args)) 4078 if (nfs4_read_stateid_changed(task, &data->args))
4079 return -EAGAIN; 4079 return -EAGAIN;
4080 return data->read_done_cb ? data->read_done_cb(task, data) : 4080 return data->pgio_done_cb ? data->pgio_done_cb(task, data) :
4081 nfs4_read_done_cb(task, data); 4081 nfs4_read_done_cb(task, data);
4082} 4082}
4083 4083
4084static void nfs4_proc_read_setup(struct nfs_read_data *data, struct rpc_message *msg) 4084static void nfs4_proc_read_setup(struct nfs_pgio_data *data, struct rpc_message *msg)
4085{ 4085{
4086 data->timestamp = jiffies; 4086 data->timestamp = jiffies;
4087 data->read_done_cb = nfs4_read_done_cb; 4087 data->pgio_done_cb = nfs4_read_done_cb;
4088 msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ]; 4088 msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ];
4089 nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 0); 4089 nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 0);
4090} 4090}
4091 4091
4092static int nfs4_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_data *data) 4092static int nfs4_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_pgio_data *data)
4093{ 4093{
4094 if (nfs4_setup_sequence(NFS_SERVER(data->header->inode), 4094 if (nfs4_setup_sequence(NFS_SERVER(data->header->inode),
4095 &data->args.seq_args, 4095 &data->args.seq_args,
@@ -4104,7 +4104,7 @@ static int nfs4_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_dat
4104 return 0; 4104 return 0;
4105} 4105}
4106 4106
4107static int nfs4_write_done_cb(struct rpc_task *task, struct nfs_write_data *data) 4107static int nfs4_write_done_cb(struct rpc_task *task, struct nfs_pgio_data *data)
4108{ 4108{
4109 struct inode *inode = data->header->inode; 4109 struct inode *inode = data->header->inode;
4110 4110
@@ -4134,18 +4134,18 @@ static bool nfs4_write_stateid_changed(struct rpc_task *task,
4134 return true; 4134 return true;
4135} 4135}
4136 4136
4137static int nfs4_write_done(struct rpc_task *task, struct nfs_write_data *data) 4137static int nfs4_write_done(struct rpc_task *task, struct nfs_pgio_data *data)
4138{ 4138{
4139 if (!nfs4_sequence_done(task, &data->res.seq_res)) 4139 if (!nfs4_sequence_done(task, &data->res.seq_res))
4140 return -EAGAIN; 4140 return -EAGAIN;
4141 if (nfs4_write_stateid_changed(task, &data->args)) 4141 if (nfs4_write_stateid_changed(task, &data->args))
4142 return -EAGAIN; 4142 return -EAGAIN;
4143 return data->write_done_cb ? data->write_done_cb(task, data) : 4143 return data->pgio_done_cb ? data->pgio_done_cb(task, data) :
4144 nfs4_write_done_cb(task, data); 4144 nfs4_write_done_cb(task, data);
4145} 4145}
4146 4146
4147static 4147static
4148bool nfs4_write_need_cache_consistency_data(const struct nfs_write_data *data) 4148bool nfs4_write_need_cache_consistency_data(const struct nfs_pgio_data *data)
4149{ 4149{
4150 const struct nfs_pgio_header *hdr = data->header; 4150 const struct nfs_pgio_header *hdr = data->header;
4151 4151
@@ -4158,7 +4158,7 @@ bool nfs4_write_need_cache_consistency_data(const struct nfs_write_data *data)
4158 return nfs4_have_delegation(hdr->inode, FMODE_READ) == 0; 4158 return nfs4_have_delegation(hdr->inode, FMODE_READ) == 0;
4159} 4159}
4160 4160
4161static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_message *msg) 4161static void nfs4_proc_write_setup(struct nfs_pgio_data *data, struct rpc_message *msg)
4162{ 4162{
4163 struct nfs_server *server = NFS_SERVER(data->header->inode); 4163 struct nfs_server *server = NFS_SERVER(data->header->inode);
4164 4164
@@ -4168,8 +4168,8 @@ static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_messag
4168 } else 4168 } else
4169 data->args.bitmask = server->cache_consistency_bitmask; 4169 data->args.bitmask = server->cache_consistency_bitmask;
4170 4170
4171 if (!data->write_done_cb) 4171 if (!data->pgio_done_cb)
4172 data->write_done_cb = nfs4_write_done_cb; 4172 data->pgio_done_cb = nfs4_write_done_cb;
4173 data->res.server = server; 4173 data->res.server = server;
4174 data->timestamp = jiffies; 4174 data->timestamp = jiffies;
4175 4175
@@ -4177,7 +4177,7 @@ static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_messag
4177 nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 1); 4177 nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 1);
4178} 4178}
4179 4179
4180static int nfs4_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_write_data *data) 4180static int nfs4_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_pgio_data *data)
4181{ 4181{
4182 if (nfs4_setup_sequence(NFS_SERVER(data->header->inode), 4182 if (nfs4_setup_sequence(NFS_SERVER(data->header->inode),
4183 &data->args.seq_args, 4183 &data->args.seq_args,
diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h
index 849cf146db30..0a744f3a86f6 100644
--- a/fs/nfs/nfs4trace.h
+++ b/fs/nfs/nfs4trace.h
@@ -932,7 +932,7 @@ DEFINE_NFS4_IDMAP_EVENT(nfs4_map_gid_to_group);
932 932
933DECLARE_EVENT_CLASS(nfs4_read_event, 933DECLARE_EVENT_CLASS(nfs4_read_event,
934 TP_PROTO( 934 TP_PROTO(
935 const struct nfs_read_data *data, 935 const struct nfs_pgio_data *data,
936 int error 936 int error
937 ), 937 ),
938 938
@@ -972,7 +972,7 @@ DECLARE_EVENT_CLASS(nfs4_read_event,
972#define DEFINE_NFS4_READ_EVENT(name) \ 972#define DEFINE_NFS4_READ_EVENT(name) \
973 DEFINE_EVENT(nfs4_read_event, name, \ 973 DEFINE_EVENT(nfs4_read_event, name, \
974 TP_PROTO( \ 974 TP_PROTO( \
975 const struct nfs_read_data *data, \ 975 const struct nfs_pgio_data *data, \
976 int error \ 976 int error \
977 ), \ 977 ), \
978 TP_ARGS(data, error)) 978 TP_ARGS(data, error))
@@ -983,7 +983,7 @@ DEFINE_NFS4_READ_EVENT(nfs4_pnfs_read);
983 983
984DECLARE_EVENT_CLASS(nfs4_write_event, 984DECLARE_EVENT_CLASS(nfs4_write_event,
985 TP_PROTO( 985 TP_PROTO(
986 const struct nfs_write_data *data, 986 const struct nfs_pgio_data *data,
987 int error 987 int error
988 ), 988 ),
989 989
@@ -1024,7 +1024,7 @@ DECLARE_EVENT_CLASS(nfs4_write_event,
1024#define DEFINE_NFS4_WRITE_EVENT(name) \ 1024#define DEFINE_NFS4_WRITE_EVENT(name) \
1025 DEFINE_EVENT(nfs4_write_event, name, \ 1025 DEFINE_EVENT(nfs4_write_event, name, \
1026 TP_PROTO( \ 1026 TP_PROTO( \
1027 const struct nfs_write_data *data, \ 1027 const struct nfs_pgio_data *data, \
1028 int error \ 1028 int error \
1029 ), \ 1029 ), \
1030 TP_ARGS(data, error)) 1030 TP_ARGS(data, error))
diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
index 5457745dd4f1..426b366b0b33 100644
--- a/fs/nfs/objlayout/objio_osd.c
+++ b/fs/nfs/objlayout/objio_osd.c
@@ -439,7 +439,7 @@ static void _read_done(struct ore_io_state *ios, void *private)
439 objlayout_read_done(&objios->oir, status, objios->sync); 439 objlayout_read_done(&objios->oir, status, objios->sync);
440} 440}
441 441
442int objio_read_pagelist(struct nfs_read_data *rdata) 442int objio_read_pagelist(struct nfs_pgio_data *rdata)
443{ 443{
444 struct nfs_pgio_header *hdr = rdata->header; 444 struct nfs_pgio_header *hdr = rdata->header;
445 struct objio_state *objios; 445 struct objio_state *objios;
@@ -487,7 +487,7 @@ static void _write_done(struct ore_io_state *ios, void *private)
487static struct page *__r4w_get_page(void *priv, u64 offset, bool *uptodate) 487static struct page *__r4w_get_page(void *priv, u64 offset, bool *uptodate)
488{ 488{
489 struct objio_state *objios = priv; 489 struct objio_state *objios = priv;
490 struct nfs_write_data *wdata = objios->oir.rpcdata; 490 struct nfs_pgio_data *wdata = objios->oir.rpcdata;
491 struct address_space *mapping = wdata->header->inode->i_mapping; 491 struct address_space *mapping = wdata->header->inode->i_mapping;
492 pgoff_t index = offset / PAGE_SIZE; 492 pgoff_t index = offset / PAGE_SIZE;
493 struct page *page; 493 struct page *page;
@@ -531,7 +531,7 @@ static const struct _ore_r4w_op _r4w_op = {
531 .put_page = &__r4w_put_page, 531 .put_page = &__r4w_put_page,
532}; 532};
533 533
534int objio_write_pagelist(struct nfs_write_data *wdata, int how) 534int objio_write_pagelist(struct nfs_pgio_data *wdata, int how)
535{ 535{
536 struct nfs_pgio_header *hdr = wdata->header; 536 struct nfs_pgio_header *hdr = wdata->header;
537 struct objio_state *objios; 537 struct objio_state *objios;
diff --git a/fs/nfs/objlayout/objlayout.c b/fs/nfs/objlayout/objlayout.c
index e4f9cbfec67b..2f955f671003 100644
--- a/fs/nfs/objlayout/objlayout.c
+++ b/fs/nfs/objlayout/objlayout.c
@@ -229,11 +229,11 @@ objlayout_io_set_result(struct objlayout_io_res *oir, unsigned index,
229static void _rpc_read_complete(struct work_struct *work) 229static void _rpc_read_complete(struct work_struct *work)
230{ 230{
231 struct rpc_task *task; 231 struct rpc_task *task;
232 struct nfs_read_data *rdata; 232 struct nfs_pgio_data *rdata;
233 233
234 dprintk("%s enter\n", __func__); 234 dprintk("%s enter\n", __func__);
235 task = container_of(work, struct rpc_task, u.tk_work); 235 task = container_of(work, struct rpc_task, u.tk_work);
236 rdata = container_of(task, struct nfs_read_data, task); 236 rdata = container_of(task, struct nfs_pgio_data, task);
237 237
238 pnfs_ld_read_done(rdata); 238 pnfs_ld_read_done(rdata);
239} 239}
@@ -241,7 +241,7 @@ static void _rpc_read_complete(struct work_struct *work)
241void 241void
242objlayout_read_done(struct objlayout_io_res *oir, ssize_t status, bool sync) 242objlayout_read_done(struct objlayout_io_res *oir, ssize_t status, bool sync)
243{ 243{
244 struct nfs_read_data *rdata = oir->rpcdata; 244 struct nfs_pgio_data *rdata = oir->rpcdata;
245 245
246 oir->status = rdata->task.tk_status = status; 246 oir->status = rdata->task.tk_status = status;
247 if (status >= 0) 247 if (status >= 0)
@@ -266,7 +266,7 @@ objlayout_read_done(struct objlayout_io_res *oir, ssize_t status, bool sync)
266 * Perform sync or async reads. 266 * Perform sync or async reads.
267 */ 267 */
268enum pnfs_try_status 268enum pnfs_try_status
269objlayout_read_pagelist(struct nfs_read_data *rdata) 269objlayout_read_pagelist(struct nfs_pgio_data *rdata)
270{ 270{
271 struct nfs_pgio_header *hdr = rdata->header; 271 struct nfs_pgio_header *hdr = rdata->header;
272 struct inode *inode = hdr->inode; 272 struct inode *inode = hdr->inode;
@@ -312,11 +312,11 @@ objlayout_read_pagelist(struct nfs_read_data *rdata)
312static void _rpc_write_complete(struct work_struct *work) 312static void _rpc_write_complete(struct work_struct *work)
313{ 313{
314 struct rpc_task *task; 314 struct rpc_task *task;
315 struct nfs_write_data *wdata; 315 struct nfs_pgio_data *wdata;
316 316
317 dprintk("%s enter\n", __func__); 317 dprintk("%s enter\n", __func__);
318 task = container_of(work, struct rpc_task, u.tk_work); 318 task = container_of(work, struct rpc_task, u.tk_work);
319 wdata = container_of(task, struct nfs_write_data, task); 319 wdata = container_of(task, struct nfs_pgio_data, task);
320 320
321 pnfs_ld_write_done(wdata); 321 pnfs_ld_write_done(wdata);
322} 322}
@@ -324,7 +324,7 @@ static void _rpc_write_complete(struct work_struct *work)
324void 324void
325objlayout_write_done(struct objlayout_io_res *oir, ssize_t status, bool sync) 325objlayout_write_done(struct objlayout_io_res *oir, ssize_t status, bool sync)
326{ 326{
327 struct nfs_write_data *wdata = oir->rpcdata; 327 struct nfs_pgio_data *wdata = oir->rpcdata;
328 328
329 oir->status = wdata->task.tk_status = status; 329 oir->status = wdata->task.tk_status = status;
330 if (status >= 0) { 330 if (status >= 0) {
@@ -351,7 +351,7 @@ objlayout_write_done(struct objlayout_io_res *oir, ssize_t status, bool sync)
351 * Perform sync or async writes. 351 * Perform sync or async writes.
352 */ 352 */
353enum pnfs_try_status 353enum pnfs_try_status
354objlayout_write_pagelist(struct nfs_write_data *wdata, 354objlayout_write_pagelist(struct nfs_pgio_data *wdata,
355 int how) 355 int how)
356{ 356{
357 struct nfs_pgio_header *hdr = wdata->header; 357 struct nfs_pgio_header *hdr = wdata->header;
diff --git a/fs/nfs/objlayout/objlayout.h b/fs/nfs/objlayout/objlayout.h
index 87aa1dec6120..01e041029a6c 100644
--- a/fs/nfs/objlayout/objlayout.h
+++ b/fs/nfs/objlayout/objlayout.h
@@ -119,8 +119,8 @@ extern void objio_free_lseg(struct pnfs_layout_segment *lseg);
119 */ 119 */
120extern void objio_free_result(struct objlayout_io_res *oir); 120extern void objio_free_result(struct objlayout_io_res *oir);
121 121
122extern int objio_read_pagelist(struct nfs_read_data *rdata); 122extern int objio_read_pagelist(struct nfs_pgio_data *rdata);
123extern int objio_write_pagelist(struct nfs_write_data *wdata, int how); 123extern int objio_write_pagelist(struct nfs_pgio_data *wdata, int how);
124 124
125/* 125/*
126 * callback API 126 * callback API
@@ -168,10 +168,10 @@ extern struct pnfs_layout_segment *objlayout_alloc_lseg(
168extern void objlayout_free_lseg(struct pnfs_layout_segment *); 168extern void objlayout_free_lseg(struct pnfs_layout_segment *);
169 169
170extern enum pnfs_try_status objlayout_read_pagelist( 170extern enum pnfs_try_status objlayout_read_pagelist(
171 struct nfs_read_data *); 171 struct nfs_pgio_data *);
172 172
173extern enum pnfs_try_status objlayout_write_pagelist( 173extern enum pnfs_try_status objlayout_write_pagelist(
174 struct nfs_write_data *, 174 struct nfs_pgio_data *,
175 int how); 175 int how);
176 176
177extern void objlayout_encode_layoutcommit( 177extern void objlayout_encode_layoutcommit(
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 3d5bc2baafd1..e9cea3ab7cf9 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1492,7 +1492,7 @@ int pnfs_write_done_resend_to_mds(struct inode *inode,
1492} 1492}
1493EXPORT_SYMBOL_GPL(pnfs_write_done_resend_to_mds); 1493EXPORT_SYMBOL_GPL(pnfs_write_done_resend_to_mds);
1494 1494
1495static void pnfs_ld_handle_write_error(struct nfs_write_data *data) 1495static void pnfs_ld_handle_write_error(struct nfs_pgio_data *data)
1496{ 1496{
1497 struct nfs_pgio_header *hdr = data->header; 1497 struct nfs_pgio_header *hdr = data->header;
1498 1498
@@ -1511,7 +1511,7 @@ static void pnfs_ld_handle_write_error(struct nfs_write_data *data)
1511/* 1511/*
1512 * Called by non rpc-based layout drivers 1512 * Called by non rpc-based layout drivers
1513 */ 1513 */
1514void pnfs_ld_write_done(struct nfs_write_data *data) 1514void pnfs_ld_write_done(struct nfs_pgio_data *data)
1515{ 1515{
1516 struct nfs_pgio_header *hdr = data->header; 1516 struct nfs_pgio_header *hdr = data->header;
1517 1517
@@ -1527,7 +1527,7 @@ EXPORT_SYMBOL_GPL(pnfs_ld_write_done);
1527 1527
1528static void 1528static void
1529pnfs_write_through_mds(struct nfs_pageio_descriptor *desc, 1529pnfs_write_through_mds(struct nfs_pageio_descriptor *desc,
1530 struct nfs_write_data *data) 1530 struct nfs_pgio_data *data)
1531{ 1531{
1532 struct nfs_pgio_header *hdr = data->header; 1532 struct nfs_pgio_header *hdr = data->header;
1533 1533
@@ -1540,7 +1540,7 @@ pnfs_write_through_mds(struct nfs_pageio_descriptor *desc,
1540} 1540}
1541 1541
1542static enum pnfs_try_status 1542static enum pnfs_try_status
1543pnfs_try_to_write_data(struct nfs_write_data *wdata, 1543pnfs_try_to_write_data(struct nfs_pgio_data *wdata,
1544 const struct rpc_call_ops *call_ops, 1544 const struct rpc_call_ops *call_ops,
1545 struct pnfs_layout_segment *lseg, 1545 struct pnfs_layout_segment *lseg,
1546 int how) 1546 int how)
@@ -1564,7 +1564,7 @@ pnfs_try_to_write_data(struct nfs_write_data *wdata,
1564static void 1564static void
1565pnfs_do_multiple_writes(struct nfs_pageio_descriptor *desc, struct list_head *head, int how) 1565pnfs_do_multiple_writes(struct nfs_pageio_descriptor *desc, struct list_head *head, int how)
1566{ 1566{
1567 struct nfs_write_data *data; 1567 struct nfs_pgio_data *data;
1568 const struct rpc_call_ops *call_ops = desc->pg_rpc_callops; 1568 const struct rpc_call_ops *call_ops = desc->pg_rpc_callops;
1569 struct pnfs_layout_segment *lseg = desc->pg_lseg; 1569 struct pnfs_layout_segment *lseg = desc->pg_lseg;
1570 1570
@@ -1572,7 +1572,7 @@ pnfs_do_multiple_writes(struct nfs_pageio_descriptor *desc, struct list_head *he
1572 while (!list_empty(head)) { 1572 while (!list_empty(head)) {
1573 enum pnfs_try_status trypnfs; 1573 enum pnfs_try_status trypnfs;
1574 1574
1575 data = list_first_entry(head, struct nfs_write_data, list); 1575 data = list_first_entry(head, struct nfs_pgio_data, list);
1576 list_del_init(&data->list); 1576 list_del_init(&data->list);
1577 1577
1578 trypnfs = pnfs_try_to_write_data(data, call_ops, lseg, how); 1578 trypnfs = pnfs_try_to_write_data(data, call_ops, lseg, how);
@@ -1647,7 +1647,7 @@ int pnfs_read_done_resend_to_mds(struct inode *inode,
1647} 1647}
1648EXPORT_SYMBOL_GPL(pnfs_read_done_resend_to_mds); 1648EXPORT_SYMBOL_GPL(pnfs_read_done_resend_to_mds);
1649 1649
1650static void pnfs_ld_handle_read_error(struct nfs_read_data *data) 1650static void pnfs_ld_handle_read_error(struct nfs_pgio_data *data)
1651{ 1651{
1652 struct nfs_pgio_header *hdr = data->header; 1652 struct nfs_pgio_header *hdr = data->header;
1653 1653
@@ -1666,7 +1666,7 @@ static void pnfs_ld_handle_read_error(struct nfs_read_data *data)
1666/* 1666/*
1667 * Called by non rpc-based layout drivers 1667 * Called by non rpc-based layout drivers
1668 */ 1668 */
1669void pnfs_ld_read_done(struct nfs_read_data *data) 1669void pnfs_ld_read_done(struct nfs_pgio_data *data)
1670{ 1670{
1671 struct nfs_pgio_header *hdr = data->header; 1671 struct nfs_pgio_header *hdr = data->header;
1672 1672
@@ -1682,7 +1682,7 @@ EXPORT_SYMBOL_GPL(pnfs_ld_read_done);
1682 1682
1683static void 1683static void
1684pnfs_read_through_mds(struct nfs_pageio_descriptor *desc, 1684pnfs_read_through_mds(struct nfs_pageio_descriptor *desc,
1685 struct nfs_read_data *data) 1685 struct nfs_pgio_data *data)
1686{ 1686{
1687 struct nfs_pgio_header *hdr = data->header; 1687 struct nfs_pgio_header *hdr = data->header;
1688 1688
@@ -1698,7 +1698,7 @@ pnfs_read_through_mds(struct nfs_pageio_descriptor *desc,
1698 * Call the appropriate parallel I/O subsystem read function. 1698 * Call the appropriate parallel I/O subsystem read function.
1699 */ 1699 */
1700static enum pnfs_try_status 1700static enum pnfs_try_status
1701pnfs_try_to_read_data(struct nfs_read_data *rdata, 1701pnfs_try_to_read_data(struct nfs_pgio_data *rdata,
1702 const struct rpc_call_ops *call_ops, 1702 const struct rpc_call_ops *call_ops,
1703 struct pnfs_layout_segment *lseg) 1703 struct pnfs_layout_segment *lseg)
1704{ 1704{
@@ -1722,7 +1722,7 @@ pnfs_try_to_read_data(struct nfs_read_data *rdata,
1722static void 1722static void
1723pnfs_do_multiple_reads(struct nfs_pageio_descriptor *desc, struct list_head *head) 1723pnfs_do_multiple_reads(struct nfs_pageio_descriptor *desc, struct list_head *head)
1724{ 1724{
1725 struct nfs_read_data *data; 1725 struct nfs_pgio_data *data;
1726 const struct rpc_call_ops *call_ops = desc->pg_rpc_callops; 1726 const struct rpc_call_ops *call_ops = desc->pg_rpc_callops;
1727 struct pnfs_layout_segment *lseg = desc->pg_lseg; 1727 struct pnfs_layout_segment *lseg = desc->pg_lseg;
1728 1728
@@ -1730,7 +1730,7 @@ pnfs_do_multiple_reads(struct nfs_pageio_descriptor *desc, struct list_head *hea
1730 while (!list_empty(head)) { 1730 while (!list_empty(head)) {
1731 enum pnfs_try_status trypnfs; 1731 enum pnfs_try_status trypnfs;
1732 1732
1733 data = list_first_entry(head, struct nfs_read_data, list); 1733 data = list_first_entry(head, struct nfs_pgio_data, list);
1734 list_del_init(&data->list); 1734 list_del_init(&data->list);
1735 1735
1736 trypnfs = pnfs_try_to_read_data(data, call_ops, lseg); 1736 trypnfs = pnfs_try_to_read_data(data, call_ops, lseg);
@@ -1821,7 +1821,7 @@ void pnfs_set_lo_fail(struct pnfs_layout_segment *lseg)
1821EXPORT_SYMBOL_GPL(pnfs_set_lo_fail); 1821EXPORT_SYMBOL_GPL(pnfs_set_lo_fail);
1822 1822
1823void 1823void
1824pnfs_set_layoutcommit(struct nfs_write_data *wdata) 1824pnfs_set_layoutcommit(struct nfs_pgio_data *wdata)
1825{ 1825{
1826 struct nfs_pgio_header *hdr = wdata->header; 1826 struct nfs_pgio_header *hdr = wdata->header;
1827 struct inode *inode = hdr->inode; 1827 struct inode *inode = hdr->inode;
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 94a9a1834b3f..0031267d7492 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -113,8 +113,8 @@ struct pnfs_layoutdriver_type {
113 * Return PNFS_ATTEMPTED to indicate the layout code has attempted 113 * Return PNFS_ATTEMPTED to indicate the layout code has attempted
114 * I/O, else return PNFS_NOT_ATTEMPTED to fall back to normal NFS 114 * I/O, else return PNFS_NOT_ATTEMPTED to fall back to normal NFS
115 */ 115 */
116 enum pnfs_try_status (*read_pagelist) (struct nfs_read_data *nfs_data); 116 enum pnfs_try_status (*read_pagelist) (struct nfs_pgio_data *nfs_data);
117 enum pnfs_try_status (*write_pagelist) (struct nfs_write_data *nfs_data, int how); 117 enum pnfs_try_status (*write_pagelist) (struct nfs_pgio_data *nfs_data, int how);
118 118
119 void (*free_deviceid_node) (struct nfs4_deviceid_node *); 119 void (*free_deviceid_node) (struct nfs4_deviceid_node *);
120 120
@@ -212,13 +212,13 @@ bool pnfs_roc(struct inode *ino);
212void pnfs_roc_release(struct inode *ino); 212void pnfs_roc_release(struct inode *ino);
213void pnfs_roc_set_barrier(struct inode *ino, u32 barrier); 213void pnfs_roc_set_barrier(struct inode *ino, u32 barrier);
214bool pnfs_roc_drain(struct inode *ino, u32 *barrier, struct rpc_task *task); 214bool pnfs_roc_drain(struct inode *ino, u32 *barrier, struct rpc_task *task);
215void pnfs_set_layoutcommit(struct nfs_write_data *wdata); 215void pnfs_set_layoutcommit(struct nfs_pgio_data *wdata);
216void pnfs_cleanup_layoutcommit(struct nfs4_layoutcommit_data *data); 216void pnfs_cleanup_layoutcommit(struct nfs4_layoutcommit_data *data);
217int pnfs_layoutcommit_inode(struct inode *inode, bool sync); 217int pnfs_layoutcommit_inode(struct inode *inode, bool sync);
218int _pnfs_return_layout(struct inode *); 218int _pnfs_return_layout(struct inode *);
219int pnfs_commit_and_return_layout(struct inode *); 219int pnfs_commit_and_return_layout(struct inode *);
220void pnfs_ld_write_done(struct nfs_write_data *); 220void pnfs_ld_write_done(struct nfs_pgio_data *);
221void pnfs_ld_read_done(struct nfs_read_data *); 221void pnfs_ld_read_done(struct nfs_pgio_data *);
222struct pnfs_layout_segment *pnfs_update_layout(struct inode *ino, 222struct pnfs_layout_segment *pnfs_update_layout(struct inode *ino,
223 struct nfs_open_context *ctx, 223 struct nfs_open_context *ctx,
224 loff_t pos, 224 loff_t pos,
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
index 8cc227fcd4d2..c54829eb2156 100644
--- a/fs/nfs/proc.c
+++ b/fs/nfs/proc.c
@@ -578,7 +578,7 @@ nfs_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
578 return 0; 578 return 0;
579} 579}
580 580
581static int nfs_read_done(struct rpc_task *task, struct nfs_read_data *data) 581static int nfs_read_done(struct rpc_task *task, struct nfs_pgio_data *data)
582{ 582{
583 struct inode *inode = data->header->inode; 583 struct inode *inode = data->header->inode;
584 584
@@ -594,18 +594,18 @@ static int nfs_read_done(struct rpc_task *task, struct nfs_read_data *data)
594 return 0; 594 return 0;
595} 595}
596 596
597static void nfs_proc_read_setup(struct nfs_read_data *data, struct rpc_message *msg) 597static void nfs_proc_read_setup(struct nfs_pgio_data *data, struct rpc_message *msg)
598{ 598{
599 msg->rpc_proc = &nfs_procedures[NFSPROC_READ]; 599 msg->rpc_proc = &nfs_procedures[NFSPROC_READ];
600} 600}
601 601
602static int nfs_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_data *data) 602static int nfs_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_pgio_data *data)
603{ 603{
604 rpc_call_start(task); 604 rpc_call_start(task);
605 return 0; 605 return 0;
606} 606}
607 607
608static int nfs_write_done(struct rpc_task *task, struct nfs_write_data *data) 608static int nfs_write_done(struct rpc_task *task, struct nfs_pgio_data *data)
609{ 609{
610 struct inode *inode = data->header->inode; 610 struct inode *inode = data->header->inode;
611 611
@@ -614,14 +614,14 @@ static int nfs_write_done(struct rpc_task *task, struct nfs_write_data *data)
614 return 0; 614 return 0;
615} 615}
616 616
617static void nfs_proc_write_setup(struct nfs_write_data *data, struct rpc_message *msg) 617static void nfs_proc_write_setup(struct nfs_pgio_data *data, struct rpc_message *msg)
618{ 618{
619 /* Note: NFSv2 ignores @stable and always uses NFS_FILE_SYNC */ 619 /* Note: NFSv2 ignores @stable and always uses NFS_FILE_SYNC */
620 data->args.stable = NFS_FILE_SYNC; 620 data->args.stable = NFS_FILE_SYNC;
621 msg->rpc_proc = &nfs_procedures[NFSPROC_WRITE]; 621 msg->rpc_proc = &nfs_procedures[NFSPROC_WRITE];
622} 622}
623 623
624static int nfs_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_write_data *data) 624static int nfs_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_pgio_data *data)
625{ 625{
626 rpc_call_start(task); 626 rpc_call_start(task);
627 return 0; 627 return 0;
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)
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index d392a70092fe..3a2fc5c4c79a 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -88,10 +88,10 @@ struct nfs_write_header *nfs_writehdr_alloc(void)
88} 88}
89EXPORT_SYMBOL_GPL(nfs_writehdr_alloc); 89EXPORT_SYMBOL_GPL(nfs_writehdr_alloc);
90 90
91static struct nfs_write_data *nfs_writedata_alloc(struct nfs_pgio_header *hdr, 91static struct nfs_pgio_data *nfs_writedata_alloc(struct nfs_pgio_header *hdr,
92 unsigned int pagecount) 92 unsigned int pagecount)
93{ 93{
94 struct nfs_write_data *data, *prealloc; 94 struct nfs_pgio_data *data, *prealloc;
95 95
96 prealloc = &container_of(hdr, struct nfs_write_header, header)->rpc_data; 96 prealloc = &container_of(hdr, struct nfs_write_header, header)->rpc_data;
97 if (prealloc->header == NULL) 97 if (prealloc->header == NULL)
@@ -120,7 +120,7 @@ void nfs_writehdr_free(struct nfs_pgio_header *hdr)
120} 120}
121EXPORT_SYMBOL_GPL(nfs_writehdr_free); 121EXPORT_SYMBOL_GPL(nfs_writehdr_free);
122 122
123void nfs_writedata_release(struct nfs_write_data *wdata) 123void nfs_writedata_release(struct nfs_pgio_data *wdata)
124{ 124{
125 struct nfs_pgio_header *hdr = wdata->header; 125 struct nfs_pgio_header *hdr = wdata->header;
126 struct nfs_write_header *write_header = container_of(hdr, struct nfs_write_header, header); 126 struct nfs_write_header *write_header = container_of(hdr, struct nfs_write_header, header);
@@ -582,7 +582,7 @@ nfs_clear_request_commit(struct nfs_page *req)
582} 582}
583 583
584static inline 584static inline
585int nfs_write_need_commit(struct nfs_write_data *data) 585int nfs_write_need_commit(struct nfs_pgio_data *data)
586{ 586{
587 if (data->verf.committed == NFS_DATA_SYNC) 587 if (data->verf.committed == NFS_DATA_SYNC)
588 return data->header->lseg == NULL; 588 return data->header->lseg == NULL;
@@ -613,7 +613,7 @@ nfs_clear_request_commit(struct nfs_page *req)
613} 613}
614 614
615static inline 615static inline
616int nfs_write_need_commit(struct nfs_write_data *data) 616int nfs_write_need_commit(struct nfs_pgio_data *data)
617{ 617{
618 return 0; 618 return 0;
619} 619}
@@ -990,7 +990,7 @@ static int flush_task_priority(int how)
990} 990}
991 991
992int nfs_initiate_write(struct rpc_clnt *clnt, 992int nfs_initiate_write(struct rpc_clnt *clnt,
993 struct nfs_write_data *data, 993 struct nfs_pgio_data *data,
994 const struct rpc_call_ops *call_ops, 994 const struct rpc_call_ops *call_ops,
995 int how, int flags) 995 int how, int flags)
996{ 996{
@@ -1047,7 +1047,7 @@ EXPORT_SYMBOL_GPL(nfs_initiate_write);
1047/* 1047/*
1048 * Set up the argument/result storage required for the RPC call. 1048 * Set up the argument/result storage required for the RPC call.
1049 */ 1049 */
1050static void nfs_write_rpcsetup(struct nfs_write_data *data, 1050static void nfs_write_rpcsetup(struct nfs_pgio_data *data,
1051 unsigned int count, unsigned int offset, 1051 unsigned int count, unsigned int offset,
1052 int how, struct nfs_commit_info *cinfo) 1052 int how, struct nfs_commit_info *cinfo)
1053{ 1053{
@@ -1082,7 +1082,7 @@ static void nfs_write_rpcsetup(struct nfs_write_data *data,
1082 nfs_fattr_init(&data->fattr); 1082 nfs_fattr_init(&data->fattr);
1083} 1083}
1084 1084
1085static int nfs_do_write(struct nfs_write_data *data, 1085static int nfs_do_write(struct nfs_pgio_data *data,
1086 const struct rpc_call_ops *call_ops, 1086 const struct rpc_call_ops *call_ops,
1087 int how) 1087 int how)
1088{ 1088{
@@ -1095,13 +1095,13 @@ static int nfs_do_multiple_writes(struct list_head *head,
1095 const struct rpc_call_ops *call_ops, 1095 const struct rpc_call_ops *call_ops,
1096 int how) 1096 int how)
1097{ 1097{
1098 struct nfs_write_data *data; 1098 struct nfs_pgio_data *data;
1099 int ret = 0; 1099 int ret = 0;
1100 1100
1101 while (!list_empty(head)) { 1101 while (!list_empty(head)) {
1102 int ret2; 1102 int ret2;
1103 1103
1104 data = list_first_entry(head, struct nfs_write_data, list); 1104 data = list_first_entry(head, struct nfs_pgio_data, list);
1105 list_del_init(&data->list); 1105 list_del_init(&data->list);
1106 1106
1107 ret2 = nfs_do_write(data, call_ops, how); 1107 ret2 = nfs_do_write(data, call_ops, how);
@@ -1144,8 +1144,8 @@ static void nfs_flush_error(struct nfs_pageio_descriptor *desc,
1144{ 1144{
1145 set_bit(NFS_IOHDR_REDO, &hdr->flags); 1145 set_bit(NFS_IOHDR_REDO, &hdr->flags);
1146 while (!list_empty(&hdr->rpc_list)) { 1146 while (!list_empty(&hdr->rpc_list)) {
1147 struct nfs_write_data *data = list_first_entry(&hdr->rpc_list, 1147 struct nfs_pgio_data *data = list_first_entry(&hdr->rpc_list,
1148 struct nfs_write_data, list); 1148 struct nfs_pgio_data, list);
1149 list_del(&data->list); 1149 list_del(&data->list);
1150 nfs_writedata_release(data); 1150 nfs_writedata_release(data);
1151 } 1151 }
@@ -1161,7 +1161,7 @@ static int nfs_flush_multi(struct nfs_pageio_descriptor *desc,
1161{ 1161{
1162 struct nfs_page *req = hdr->req; 1162 struct nfs_page *req = hdr->req;
1163 struct page *page = req->wb_page; 1163 struct page *page = req->wb_page;
1164 struct nfs_write_data *data; 1164 struct nfs_pgio_data *data;
1165 size_t wsize = desc->pg_bsize, nbytes; 1165 size_t wsize = desc->pg_bsize, nbytes;
1166 unsigned int offset; 1166 unsigned int offset;
1167 int requests = 0; 1167 int requests = 0;
@@ -1211,7 +1211,7 @@ static int nfs_flush_one(struct nfs_pageio_descriptor *desc,
1211{ 1211{
1212 struct nfs_page *req; 1212 struct nfs_page *req;
1213 struct page **pages; 1213 struct page **pages;
1214 struct nfs_write_data *data; 1214 struct nfs_pgio_data *data;
1215 struct list_head *head = &desc->pg_list; 1215 struct list_head *head = &desc->pg_list;
1216 struct nfs_commit_info cinfo; 1216 struct nfs_commit_info cinfo;
1217 1217
@@ -1305,7 +1305,7 @@ EXPORT_SYMBOL_GPL(nfs_pageio_reset_write_mds);
1305 1305
1306void nfs_write_prepare(struct rpc_task *task, void *calldata) 1306void nfs_write_prepare(struct rpc_task *task, void *calldata)
1307{ 1307{
1308 struct nfs_write_data *data = calldata; 1308 struct nfs_pgio_data *data = calldata;
1309 int err; 1309 int err;
1310 err = NFS_PROTO(data->header->inode)->write_rpc_prepare(task, data); 1310 err = NFS_PROTO(data->header->inode)->write_rpc_prepare(task, data);
1311 if (err) 1311 if (err)
@@ -1328,14 +1328,14 @@ void nfs_commit_prepare(struct rpc_task *task, void *calldata)
1328 */ 1328 */
1329static void nfs_writeback_done_common(struct rpc_task *task, void *calldata) 1329static void nfs_writeback_done_common(struct rpc_task *task, void *calldata)
1330{ 1330{
1331 struct nfs_write_data *data = calldata; 1331 struct nfs_pgio_data *data = calldata;
1332 1332
1333 nfs_writeback_done(task, data); 1333 nfs_writeback_done(task, data);
1334} 1334}
1335 1335
1336static void nfs_writeback_release_common(void *calldata) 1336static void nfs_writeback_release_common(void *calldata)
1337{ 1337{
1338 struct nfs_write_data *data = calldata; 1338 struct nfs_pgio_data *data = calldata;
1339 struct nfs_pgio_header *hdr = data->header; 1339 struct nfs_pgio_header *hdr = data->header;
1340 int status = data->task.tk_status; 1340 int status = data->task.tk_status;
1341 1341
@@ -1386,7 +1386,7 @@ static int nfs_should_remove_suid(const struct inode *inode)
1386/* 1386/*
1387 * This function is called when the WRITE call is complete. 1387 * This function is called when the WRITE call is complete.
1388 */ 1388 */
1389void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data) 1389void nfs_writeback_done(struct rpc_task *task, struct nfs_pgio_data *data)
1390{ 1390{
1391 struct nfs_pgio_args *argp = &data->args; 1391 struct nfs_pgio_args *argp = &data->args;
1392 struct nfs_pgio_res *resp = &data->res; 1392 struct nfs_pgio_res *resp = &data->res;