aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_xdr.h
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/linux/nfs_xdr.h
parentcd841605f7a721878d8a2d1362484723d8abf569 (diff)
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/linux/nfs_xdr.h')
-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;
1167 1167
1168#define NFS_PAGEVEC_SIZE (8U) 1168#define NFS_PAGEVEC_SIZE (8U)
1169 1169
1170struct nfs_page_array {
1171 struct page **pagevec;
1172 unsigned int npages; /* Max length of pagevec */
1173 struct page *page_array[NFS_PAGEVEC_SIZE];
1174};
1175
1170struct nfs_read_data { 1176struct nfs_read_data {
1171 struct nfs_pgio_header *header; 1177 struct nfs_pgio_header *header;
1172 struct list_head list; 1178 struct list_head list;
1173 struct rpc_task task; 1179 struct rpc_task task;
1174 struct nfs_fattr fattr; /* fattr storage */ 1180 struct nfs_fattr fattr; /* fattr storage */
1175 struct page **pagevec;
1176 unsigned int npages; /* Max length of pagevec */
1177 struct nfs_readargs args; 1181 struct nfs_readargs args;
1178 struct nfs_readres res; 1182 struct nfs_readres res;
1179 unsigned long timestamp; /* For lease renewal */ 1183 unsigned long timestamp; /* For lease renewal */
1180 int (*read_done_cb) (struct rpc_task *task, struct nfs_read_data *data); 1184 int (*read_done_cb) (struct rpc_task *task, struct nfs_read_data *data);
1181 __u64 mds_offset; 1185 __u64 mds_offset;
1182 struct page *page_array[NFS_PAGEVEC_SIZE]; 1186 struct nfs_page_array pages;
1183 struct nfs_client *ds_clp; /* pNFS data server */ 1187 struct nfs_client *ds_clp; /* pNFS data server */
1184}; 1188};
1185 1189
@@ -1206,14 +1210,12 @@ struct nfs_write_data {
1206 struct rpc_task task; 1210 struct rpc_task task;
1207 struct nfs_fattr fattr; 1211 struct nfs_fattr fattr;
1208 struct nfs_writeverf verf; 1212 struct nfs_writeverf verf;
1209 struct page **pagevec;
1210 unsigned int npages; /* Max length of pagevec */
1211 struct nfs_writeargs args; /* argument struct */ 1213 struct nfs_writeargs args; /* argument struct */
1212 struct nfs_writeres res; /* result struct */ 1214 struct nfs_writeres res; /* result struct */
1213 unsigned long timestamp; /* For lease renewal */ 1215 unsigned long timestamp; /* For lease renewal */
1214 int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data); 1216 int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data);
1215 __u64 mds_offset; /* Filelayout dense stripe */ 1217 __u64 mds_offset; /* Filelayout dense stripe */
1216 struct page *page_array[NFS_PAGEVEC_SIZE]; 1218 struct nfs_page_array pages;
1217 struct nfs_client *ds_clp; /* pNFS data server */ 1219 struct nfs_client *ds_clp; /* pNFS data server */
1218}; 1220};
1219 1221