aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorFred Isaman <iisaman@netapp.com>2012-04-20 14:47:48 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-04-27 14:10:38 -0400
commit061ae2edb7375ab6776468b075da71008a098b55 (patch)
treea34f25d4d85d90a196b058b879eef3ba374f6d16 /include/linux
parent6c75dc0d498caa402fb17b1bf769835a9db875c8 (diff)
NFS: create completion structure to pass into page_init functions
Factors out the code that will need to change when directio starts using these code paths. This will allow directio to use the generic pagein and flush routines Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfs_page.h2
-rw-r--r--include/linux/nfs_xdr.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index 5c520344d8ad..bc5b7a5e787e 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -67,6 +67,7 @@ struct nfs_pageio_descriptor {
67 int pg_ioflags; 67 int pg_ioflags;
68 int pg_error; 68 int pg_error;
69 const struct rpc_call_ops *pg_rpc_callops; 69 const struct rpc_call_ops *pg_rpc_callops;
70 const struct nfs_pgio_completion_ops *pg_completion_ops;
70 struct pnfs_layout_segment *pg_lseg; 71 struct pnfs_layout_segment *pg_lseg;
71}; 72};
72 73
@@ -83,6 +84,7 @@ extern void nfs_release_request(struct nfs_page *req);
83extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, 84extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
84 struct inode *inode, 85 struct inode *inode,
85 const struct nfs_pageio_ops *pg_ops, 86 const struct nfs_pageio_ops *pg_ops,
87 const struct nfs_pgio_completion_ops *compl_ops,
86 size_t bsize, 88 size_t bsize,
87 int how); 89 int how);
88extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, 90extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *,
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 0d17db7973de..6fa1d2278c9d 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1207,6 +1207,7 @@ struct nfs_pgio_header {
1207 loff_t io_start; 1207 loff_t io_start;
1208 const struct rpc_call_ops *mds_ops; 1208 const struct rpc_call_ops *mds_ops;
1209 void (*release) (struct nfs_pgio_header *hdr); 1209 void (*release) (struct nfs_pgio_header *hdr);
1210 const struct nfs_pgio_completion_ops *completion_ops;
1210 spinlock_t lock; 1211 spinlock_t lock;
1211 /* fields protected by lock */ 1212 /* fields protected by lock */
1212 int pnfs_error; 1213 int pnfs_error;
@@ -1261,6 +1262,11 @@ struct nfs_commit_data {
1261 int (*commit_done_cb) (struct rpc_task *task, struct nfs_commit_data *data); 1262 int (*commit_done_cb) (struct rpc_task *task, struct nfs_commit_data *data);
1262}; 1263};
1263 1264
1265struct nfs_pgio_completion_ops {
1266 void (*error_cleanup)(struct list_head *head);
1267 void (*completion)(struct nfs_pgio_header *hdr);
1268};
1269
1264struct nfs_unlinkdata { 1270struct nfs_unlinkdata {
1265 struct hlist_node list; 1271 struct hlist_node list;
1266 struct nfs_removeargs args; 1272 struct nfs_removeargs args;