diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfs_page.h | 20 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 1 |
2 files changed, 18 insertions, 3 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 479c566c4ddc..3eb072dbce83 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -58,6 +58,8 @@ 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 *); | ||
| 61 | void (*pg_cleanup)(struct nfs_pageio_descriptor *); | 63 | void (*pg_cleanup)(struct nfs_pageio_descriptor *); |
| 62 | }; | 64 | }; |
| 63 | 65 | ||
| @@ -74,15 +76,17 @@ struct nfs_rw_ops { | |||
| 74 | struct rpc_task_setup *, int); | 76 | struct rpc_task_setup *, int); |
| 75 | }; | 77 | }; |
| 76 | 78 | ||
| 77 | struct nfs_pageio_descriptor { | 79 | struct nfs_pgio_mirror { |
| 78 | struct list_head pg_list; | 80 | struct list_head pg_list; |
| 79 | unsigned long pg_bytes_written; | 81 | unsigned long pg_bytes_written; |
| 80 | size_t pg_count; | 82 | size_t pg_count; |
| 81 | size_t pg_bsize; | 83 | size_t pg_bsize; |
| 82 | unsigned int pg_base; | 84 | unsigned int pg_base; |
| 83 | unsigned char pg_moreio : 1, | 85 | unsigned char pg_recoalesce : 1; |
| 84 | pg_recoalesce : 1; | 86 | }; |
| 85 | 87 | ||
| 88 | struct nfs_pageio_descriptor { | ||
| 89 | unsigned char pg_moreio : 1; | ||
| 86 | struct inode *pg_inode; | 90 | struct inode *pg_inode; |
| 87 | const struct nfs_pageio_ops *pg_ops; | 91 | const struct nfs_pageio_ops *pg_ops; |
| 88 | const struct nfs_rw_ops *pg_rw_ops; | 92 | const struct nfs_rw_ops *pg_rw_ops; |
| @@ -93,8 +97,18 @@ struct nfs_pageio_descriptor { | |||
| 93 | struct pnfs_layout_segment *pg_lseg; | 97 | struct pnfs_layout_segment *pg_lseg; |
| 94 | struct nfs_direct_req *pg_dreq; | 98 | struct nfs_direct_req *pg_dreq; |
| 95 | 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 */ | ||
| 96 | }; | 107 | }; |
| 97 | 108 | ||
| 109 | /* arbitrarily selected limit to number of mirrors */ | ||
| 110 | #define NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX 16 | ||
| 111 | |||
| 98 | #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)) |
| 99 | 113 | ||
| 100 | 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, |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 5bc99f04a550..6400a1e01aa4 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -1329,6 +1329,7 @@ struct nfs_pgio_header { | |||
| 1329 | struct nfs_page_array page_array; | 1329 | struct nfs_page_array page_array; |
| 1330 | struct nfs_client *ds_clp; /* pNFS data server */ | 1330 | struct nfs_client *ds_clp; /* pNFS data server */ |
| 1331 | int ds_commit_idx; /* ds index if ds_clp is set */ | 1331 | int ds_commit_idx; /* ds index if ds_clp is set */ |
| 1332 | int pgio_mirror_idx;/* mirror index in pgio layer */ | ||
| 1332 | }; | 1333 | }; |
| 1333 | 1334 | ||
| 1334 | struct nfs_mds_commit_info { | 1335 | struct nfs_mds_commit_info { |
