aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_page.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nfs_page.h')
-rw-r--r--include/linux/nfs_page.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index d55cee73f634..91af2e49fa3a 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -33,11 +33,15 @@ enum {
33 PG_CLEAN, 33 PG_CLEAN,
34 PG_NEED_COMMIT, 34 PG_NEED_COMMIT,
35 PG_NEED_RESCHED, 35 PG_NEED_RESCHED,
36 PG_PNFS_COMMIT,
36}; 37};
37 38
38struct nfs_inode; 39struct nfs_inode;
39struct nfs_page { 40struct nfs_page {
40 struct list_head wb_list; /* Defines state of page: */ 41 union {
42 struct list_head wb_list; /* Defines state of page: */
43 struct pnfs_layout_segment *wb_commit_lseg; /* Used when PG_PNFS_COMMIT set */
44 };
41 struct page *wb_page; /* page to read in/write out */ 45 struct page *wb_page; /* page to read in/write out */
42 struct nfs_open_context *wb_context; /* File state context info */ 46 struct nfs_open_context *wb_context; /* File state context info */
43 struct nfs_lock_context *wb_lock_context; /* lock context info */ 47 struct nfs_lock_context *wb_lock_context; /* lock context info */
@@ -57,11 +61,14 @@ struct nfs_pageio_descriptor {
57 size_t pg_count; 61 size_t pg_count;
58 size_t pg_bsize; 62 size_t pg_bsize;
59 unsigned int pg_base; 63 unsigned int pg_base;
64 char pg_moreio;
60 65
61 struct inode *pg_inode; 66 struct inode *pg_inode;
62 int (*pg_doio)(struct inode *, struct list_head *, unsigned int, size_t, int); 67 int (*pg_doio)(struct nfs_pageio_descriptor *);
63 int pg_ioflags; 68 int pg_ioflags;
64 int pg_error; 69 int pg_error;
70 struct pnfs_layout_segment *pg_lseg;
71 int (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, struct nfs_page *);
65}; 72};
66 73
67#define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) 74#define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags))
@@ -71,7 +78,6 @@ extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx,
71 struct page *page, 78 struct page *page,
72 unsigned int offset, 79 unsigned int offset,
73 unsigned int count); 80 unsigned int count);
74extern void nfs_clear_request(struct nfs_page *req);
75extern void nfs_release_request(struct nfs_page *req); 81extern void nfs_release_request(struct nfs_page *req);
76 82
77 83
@@ -79,7 +85,7 @@ extern int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *dst,
79 pgoff_t idx_start, unsigned int npages, int tag); 85 pgoff_t idx_start, unsigned int npages, int tag);
80extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, 86extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
81 struct inode *inode, 87 struct inode *inode,
82 int (*doio)(struct inode *, struct list_head *, unsigned int, size_t, int), 88 int (*doio)(struct nfs_pageio_descriptor *desc),
83 size_t bsize, 89 size_t bsize,
84 int how); 90 int how);
85extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, 91extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *,