aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_page.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/nfs_page.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/nfs_page.h')
-rw-r--r--include/linux/nfs_page.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index f8b60e7f4c44..25311b3bedf8 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -29,14 +29,19 @@
29 */ 29 */
30enum { 30enum {
31 PG_BUSY = 0, 31 PG_BUSY = 0,
32 PG_MAPPED,
32 PG_CLEAN, 33 PG_CLEAN,
33 PG_NEED_COMMIT, 34 PG_NEED_COMMIT,
34 PG_NEED_RESCHED, 35 PG_NEED_RESCHED,
36 PG_PNFS_COMMIT,
35}; 37};
36 38
37struct nfs_inode; 39struct nfs_inode;
38struct nfs_page { 40struct nfs_page {
39 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 };
40 struct page *wb_page; /* page to read in/write out */ 45 struct page *wb_page; /* page to read in/write out */
41 struct nfs_open_context *wb_context; /* File state context info */ 46 struct nfs_open_context *wb_context; /* File state context info */
42 struct nfs_lock_context *wb_lock_context; /* lock context info */ 47 struct nfs_lock_context *wb_lock_context; /* lock context info */
@@ -56,11 +61,14 @@ struct nfs_pageio_descriptor {
56 size_t pg_count; 61 size_t pg_count;
57 size_t pg_bsize; 62 size_t pg_bsize;
58 unsigned int pg_base; 63 unsigned int pg_base;
64 char pg_moreio;
59 65
60 struct inode *pg_inode; 66 struct inode *pg_inode;
61 int (*pg_doio)(struct inode *, struct list_head *, unsigned int, size_t, int); 67 int (*pg_doio)(struct nfs_pageio_descriptor *);
62 int pg_ioflags; 68 int pg_ioflags;
63 int pg_error; 69 int pg_error;
70 struct pnfs_layout_segment *pg_lseg;
71 bool (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, struct nfs_page *);
64}; 72};
65 73
66#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))
@@ -70,7 +78,6 @@ extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx,
70 struct page *page, 78 struct page *page,
71 unsigned int offset, 79 unsigned int offset,
72 unsigned int count); 80 unsigned int count);
73extern void nfs_clear_request(struct nfs_page *req);
74extern void nfs_release_request(struct nfs_page *req); 81extern void nfs_release_request(struct nfs_page *req);
75 82
76 83
@@ -78,13 +85,16 @@ extern int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *dst,
78 pgoff_t idx_start, unsigned int npages, int tag); 85 pgoff_t idx_start, unsigned int npages, int tag);
79extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, 86extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
80 struct inode *inode, 87 struct inode *inode,
81 int (*doio)(struct inode *, struct list_head *, unsigned int, size_t, int), 88 int (*doio)(struct nfs_pageio_descriptor *desc),
82 size_t bsize, 89 size_t bsize,
83 int how); 90 int how);
84extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, 91extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *,
85 struct nfs_page *); 92 struct nfs_page *);
86extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc); 93extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc);
87extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t); 94extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t);
95extern bool nfs_generic_pg_test(struct nfs_pageio_descriptor *desc,
96 struct nfs_page *prev,
97 struct nfs_page *req);
88extern int nfs_wait_on_request(struct nfs_page *); 98extern int nfs_wait_on_request(struct nfs_page *);
89extern void nfs_unlock_request(struct nfs_page *req); 99extern void nfs_unlock_request(struct nfs_page *req);
90extern int nfs_set_page_tag_locked(struct nfs_page *req); 100extern int nfs_set_page_tag_locked(struct nfs_page *req);