[PATCH 1/3] SQUASHME: pnfs-submit: add nr_pages back to write_pagelist api

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

 



Keep it symmetrical with read_pagelist, using nfs_page_array_len.

Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx>
---
 fs/nfs/pnfs.c             |    4 +++-
 include/linux/nfs4_pnfs.h |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 4de0b73..6ab1938 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1269,7 +1269,9 @@ pnfs_try_to_write_data(struct nfs_write_data *wdata,
 	get_lseg(lseg);
 
 	wdata->pdata.lseg = lseg;
-	trypnfs = nfss->pnfs_curr_ld->ld_io_ops->write_pagelist(wdata, how);
+	trypnfs = nfss->pnfs_curr_ld->ld_io_ops->write_pagelist(wdata,
+		nfs_page_array_len(wdata->args.pgbase, wdata->args.count),
+								how);
 
 	if (trypnfs == PNFS_NOT_ATTEMPTED) {
 		wdata->pdata.lseg = NULL;
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index 1c3cd49..6236687 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -130,7 +130,7 @@ struct layoutdriver_io_operations {
 	enum pnfs_try_status
 	(*read_pagelist) (struct nfs_read_data *nfs_data, unsigned nr_pages);
 	enum pnfs_try_status
-	(*write_pagelist) (struct nfs_write_data *nfs_data, int how);
+	(*write_pagelist) (struct nfs_write_data *nfs_data, unsigned nr_pages, int how);
 
 	/* Consistency ops */
 	/* 2 problems:
-- 
1.7.1.1

--
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