[PATCH 2/7] SQUASHME pnfs-submit consolidate read_pagelist parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andy Adamson <andros@xxxxxxxxxx>

NOTE: API change.

Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
---
 fs/nfs/pnfs.c             |   17 ++++-------------
 include/linux/nfs4_pnfs.h |    5 +----
 2 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 56c3af4..576946b 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1325,23 +1325,21 @@ enum pnfs_try_status
 pnfs_try_to_read_data(struct nfs_read_data *rdata,
 		       const struct rpc_call_ops *call_ops)
 {
-	struct nfs_readargs *args = &rdata->args;
 	struct inode *inode = rdata->inode;
-	int numpages, pgcount, temp;
 	struct nfs_server *nfss = NFS_SERVER(inode);
-	struct nfs_inode *nfsi = NFS_I(inode);
 	struct pnfs_layout_segment *lseg = rdata->req->wb_lseg;
+	int numpages, pgcount, temp;
 	enum pnfs_try_status trypnfs;
 
 	rdata->pdata.call_ops = call_ops;
 
 	dprintk("%s: Reading ino:%lu %u@%llu\n",
-		__func__, inode->i_ino, args->count, args->offset);
+		__func__, inode->i_ino, rdata->args.count, rdata->args.offset);
 
 	get_lseg(lseg);
 
 	/* Determine number of pages. */
-	pgcount = args->pgbase + args->count;
+	pgcount = rdata->args.pgbase + rdata->args.count;
 	temp = pgcount % PAGE_CACHE_SIZE;
 	numpages = pgcount / PAGE_CACHE_SIZE;
 	if (temp != 0)
@@ -1350,14 +1348,7 @@ pnfs_try_to_read_data(struct nfs_read_data *rdata,
 	dprintk("%s: Calling layout driver read with %d pages\n",
 		__func__, numpages);
 	rdata->pdata.lseg = lseg;
-	trypnfs = nfss->pnfs_curr_ld->ld_io_ops->read_pagelist(
-							nfsi->layout,
-							args->pages,
-							args->pgbase,
-							numpages,
-							(loff_t)args->offset,
-							args->count,
-							rdata);
+	trypnfs = nfss->pnfs_curr_ld->ld_io_ops->read_pagelist(rdata, numpages);
 	if (trypnfs == PNFS_NOT_ATTEMPTED) {
 		rdata->pdata.lseg = NULL;
 		put_lseg(lseg);
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index fe18143..b379225 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -128,10 +128,7 @@ struct layoutdriver_io_operations {
 	 * MUST be called.
 	 */
 	enum pnfs_try_status
-	(*read_pagelist) (struct pnfs_layout_type *layoutid,
-			  struct page **pages, unsigned int pgbase,
-			  unsigned nr_pages, loff_t offset, size_t count,
-			  struct nfs_read_data *nfs_data);
+	(*read_pagelist) (struct nfs_read_data *nfs_data, unsigned nr_pages);
 	enum pnfs_try_status
 	(*write_pagelist) (struct pnfs_layout_type *layoutid,
 			   struct page **pages, unsigned int pgbase,
-- 
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux