diff options
Diffstat (limited to 'include/linux/nfs_page.h')
-rw-r--r-- | include/linux/nfs_page.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 25311b3bedf8..e2791a27a901 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -55,20 +55,28 @@ struct nfs_page { | |||
55 | struct nfs_writeverf wb_verf; /* Commit cookie */ | 55 | struct nfs_writeverf wb_verf; /* Commit cookie */ |
56 | }; | 56 | }; |
57 | 57 | ||
58 | struct nfs_pageio_descriptor; | ||
59 | struct nfs_pageio_ops { | ||
60 | void (*pg_init)(struct nfs_pageio_descriptor *, struct nfs_page *); | ||
61 | bool (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, struct nfs_page *); | ||
62 | int (*pg_doio)(struct nfs_pageio_descriptor *); | ||
63 | }; | ||
64 | |||
58 | struct nfs_pageio_descriptor { | 65 | struct nfs_pageio_descriptor { |
59 | struct list_head pg_list; | 66 | struct list_head pg_list; |
60 | unsigned long pg_bytes_written; | 67 | unsigned long pg_bytes_written; |
61 | size_t pg_count; | 68 | size_t pg_count; |
62 | size_t pg_bsize; | 69 | size_t pg_bsize; |
63 | unsigned int pg_base; | 70 | unsigned int pg_base; |
64 | char pg_moreio; | 71 | unsigned char pg_moreio : 1, |
72 | pg_recoalesce : 1; | ||
65 | 73 | ||
66 | struct inode *pg_inode; | 74 | struct inode *pg_inode; |
67 | int (*pg_doio)(struct nfs_pageio_descriptor *); | 75 | const struct nfs_pageio_ops *pg_ops; |
68 | int pg_ioflags; | 76 | int pg_ioflags; |
69 | int pg_error; | 77 | int pg_error; |
78 | const struct rpc_call_ops *pg_rpc_callops; | ||
70 | struct pnfs_layout_segment *pg_lseg; | 79 | struct pnfs_layout_segment *pg_lseg; |
71 | bool (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, struct nfs_page *); | ||
72 | }; | 80 | }; |
73 | 81 | ||
74 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) | 82 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) |
@@ -85,7 +93,7 @@ extern int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *dst, | |||
85 | pgoff_t idx_start, unsigned int npages, int tag); | 93 | pgoff_t idx_start, unsigned int npages, int tag); |
86 | extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, | 94 | extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, |
87 | struct inode *inode, | 95 | struct inode *inode, |
88 | int (*doio)(struct nfs_pageio_descriptor *desc), | 96 | const struct nfs_pageio_ops *pg_ops, |
89 | size_t bsize, | 97 | size_t bsize, |
90 | int how); | 98 | int how); |
91 | extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, | 99 | extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, |
@@ -100,7 +108,6 @@ extern void nfs_unlock_request(struct nfs_page *req); | |||
100 | extern int nfs_set_page_tag_locked(struct nfs_page *req); | 108 | extern int nfs_set_page_tag_locked(struct nfs_page *req); |
101 | extern void nfs_clear_page_tag_locked(struct nfs_page *req); | 109 | extern void nfs_clear_page_tag_locked(struct nfs_page *req); |
102 | 110 | ||
103 | |||
104 | /* | 111 | /* |
105 | * Lock the page of an asynchronous request without getting a new reference | 112 | * Lock the page of an asynchronous request without getting a new reference |
106 | */ | 113 | */ |