diff options
Diffstat (limited to 'include/linux/nfs_page.h')
-rw-r--r-- | include/linux/nfs_page.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 6c3e06ee2fb7..3eb072dbce83 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -58,6 +58,9 @@ struct nfs_pageio_ops { | |||
58 | size_t (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, | 58 | size_t (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, |
59 | struct nfs_page *); | 59 | struct nfs_page *); |
60 | int (*pg_doio)(struct nfs_pageio_descriptor *); | 60 | int (*pg_doio)(struct nfs_pageio_descriptor *); |
61 | unsigned int (*pg_get_mirror_count)(struct nfs_pageio_descriptor *, | ||
62 | struct nfs_page *); | ||
63 | void (*pg_cleanup)(struct nfs_pageio_descriptor *); | ||
61 | }; | 64 | }; |
62 | 65 | ||
63 | struct nfs_rw_ops { | 66 | struct nfs_rw_ops { |
@@ -69,18 +72,21 @@ struct nfs_rw_ops { | |||
69 | struct inode *); | 72 | struct inode *); |
70 | void (*rw_result)(struct rpc_task *, struct nfs_pgio_header *); | 73 | void (*rw_result)(struct rpc_task *, struct nfs_pgio_header *); |
71 | void (*rw_initiate)(struct nfs_pgio_header *, struct rpc_message *, | 74 | void (*rw_initiate)(struct nfs_pgio_header *, struct rpc_message *, |
75 | const struct nfs_rpc_ops *, | ||
72 | struct rpc_task_setup *, int); | 76 | struct rpc_task_setup *, int); |
73 | }; | 77 | }; |
74 | 78 | ||
75 | struct nfs_pageio_descriptor { | 79 | struct nfs_pgio_mirror { |
76 | struct list_head pg_list; | 80 | struct list_head pg_list; |
77 | unsigned long pg_bytes_written; | 81 | unsigned long pg_bytes_written; |
78 | size_t pg_count; | 82 | size_t pg_count; |
79 | size_t pg_bsize; | 83 | size_t pg_bsize; |
80 | unsigned int pg_base; | 84 | unsigned int pg_base; |
81 | unsigned char pg_moreio : 1, | 85 | unsigned char pg_recoalesce : 1; |
82 | pg_recoalesce : 1; | 86 | }; |
83 | 87 | ||
88 | struct nfs_pageio_descriptor { | ||
89 | unsigned char pg_moreio : 1; | ||
84 | struct inode *pg_inode; | 90 | struct inode *pg_inode; |
85 | const struct nfs_pageio_ops *pg_ops; | 91 | const struct nfs_pageio_ops *pg_ops; |
86 | const struct nfs_rw_ops *pg_rw_ops; | 92 | const struct nfs_rw_ops *pg_rw_ops; |
@@ -91,8 +97,18 @@ struct nfs_pageio_descriptor { | |||
91 | struct pnfs_layout_segment *pg_lseg; | 97 | struct pnfs_layout_segment *pg_lseg; |
92 | struct nfs_direct_req *pg_dreq; | 98 | struct nfs_direct_req *pg_dreq; |
93 | void *pg_layout_private; | 99 | void *pg_layout_private; |
100 | unsigned int pg_bsize; /* default bsize for mirrors */ | ||
101 | |||
102 | u32 pg_mirror_count; | ||
103 | struct nfs_pgio_mirror *pg_mirrors; | ||
104 | struct nfs_pgio_mirror pg_mirrors_static[1]; | ||
105 | struct nfs_pgio_mirror *pg_mirrors_dynamic; | ||
106 | u32 pg_mirror_idx; /* current mirror */ | ||
94 | }; | 107 | }; |
95 | 108 | ||
109 | /* arbitrarily selected limit to number of mirrors */ | ||
110 | #define NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX 16 | ||
111 | |||
96 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) | 112 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) |
97 | 113 | ||
98 | extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, | 114 | extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, |