summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFred Isaman <iisaman@netapp.com>2012-04-20 14:47:45 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-04-27 14:10:37 -0400
commit30dd374f6fc1b202db3a1b57b61afff1326bad92 (patch)
tree7d3b631be897dd79a916ee8d410fd2bb92da4890 /include
parentcd841605f7a721878d8a2d1362484723d8abf569 (diff)
downloadlinux-30dd374f6fc1b202db3a1b57b61afff1326bad92.tar.bz2
NFS: create struct nfs_page_array
Both nfs_read_data and nfs_write_data devote several fields which can be combined into a single shared struct. Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_xdr.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index fee324175391..e34beaf86e9c 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1167,19 +1167,23 @@ struct nfs_page;
#define NFS_PAGEVEC_SIZE (8U)
+struct nfs_page_array {
+ struct page **pagevec;
+ unsigned int npages; /* Max length of pagevec */
+ struct page *page_array[NFS_PAGEVEC_SIZE];
+};
+
struct nfs_read_data {
struct nfs_pgio_header *header;
struct list_head list;
struct rpc_task task;
struct nfs_fattr fattr; /* fattr storage */
- struct page **pagevec;
- unsigned int npages; /* Max length of pagevec */
struct nfs_readargs args;
struct nfs_readres res;
unsigned long timestamp; /* For lease renewal */
int (*read_done_cb) (struct rpc_task *task, struct nfs_read_data *data);
__u64 mds_offset;
- struct page *page_array[NFS_PAGEVEC_SIZE];
+ struct nfs_page_array pages;
struct nfs_client *ds_clp; /* pNFS data server */
};
@@ -1206,14 +1210,12 @@ struct nfs_write_data {
struct rpc_task task;
struct nfs_fattr fattr;
struct nfs_writeverf verf;
- struct page **pagevec;
- unsigned int npages; /* Max length of pagevec */
struct nfs_writeargs args; /* argument struct */
struct nfs_writeres res; /* result struct */
unsigned long timestamp; /* For lease renewal */
int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data);
__u64 mds_offset; /* Filelayout dense stripe */
- struct page *page_array[NFS_PAGEVEC_SIZE];
+ struct nfs_page_array pages;
struct nfs_client *ds_clp; /* pNFS data server */
};