diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/osd_client.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 0c5bf2fb5075..409c443c8d1f 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -117,7 +117,7 @@ static void ceph_osd_data_bio_init(struct ceph_osd_data *osd_data, | |||
117 | 117 | ||
118 | struct ceph_osd_data * | 118 | struct ceph_osd_data * |
119 | osd_req_op_extent_osd_data(struct ceph_osd_request *osd_req, | 119 | osd_req_op_extent_osd_data(struct ceph_osd_request *osd_req, |
120 | unsigned int which, bool write_request) | 120 | unsigned int which) |
121 | { | 121 | { |
122 | BUG_ON(which >= osd_req->r_num_ops); | 122 | BUG_ON(which >= osd_req->r_num_ops); |
123 | 123 | ||
@@ -156,37 +156,34 @@ osd_req_op_cls_response_data(struct ceph_osd_request *osd_req, | |||
156 | EXPORT_SYMBOL(osd_req_op_cls_response_data); /* ??? */ | 156 | EXPORT_SYMBOL(osd_req_op_cls_response_data); /* ??? */ |
157 | 157 | ||
158 | void osd_req_op_extent_osd_data_pages(struct ceph_osd_request *osd_req, | 158 | void osd_req_op_extent_osd_data_pages(struct ceph_osd_request *osd_req, |
159 | unsigned int which, bool write_request, | 159 | unsigned int which, struct page **pages, |
160 | struct page **pages, u64 length, u32 alignment, | 160 | u64 length, u32 alignment, |
161 | bool pages_from_pool, bool own_pages) | 161 | bool pages_from_pool, bool own_pages) |
162 | { | 162 | { |
163 | struct ceph_osd_data *osd_data; | 163 | struct ceph_osd_data *osd_data; |
164 | 164 | ||
165 | osd_data = osd_req_op_extent_osd_data(osd_req, which, write_request); | 165 | osd_data = osd_req_op_extent_osd_data(osd_req, which); |
166 | ceph_osd_data_pages_init(osd_data, pages, length, alignment, | 166 | ceph_osd_data_pages_init(osd_data, pages, length, alignment, |
167 | pages_from_pool, own_pages); | 167 | pages_from_pool, own_pages); |
168 | } | 168 | } |
169 | EXPORT_SYMBOL(osd_req_op_extent_osd_data_pages); | 169 | EXPORT_SYMBOL(osd_req_op_extent_osd_data_pages); |
170 | 170 | ||
171 | void osd_req_op_extent_osd_data_pagelist(struct ceph_osd_request *osd_req, | 171 | void osd_req_op_extent_osd_data_pagelist(struct ceph_osd_request *osd_req, |
172 | unsigned int which, bool write_request, | 172 | unsigned int which, struct ceph_pagelist *pagelist) |
173 | struct ceph_pagelist *pagelist) | ||
174 | { | 173 | { |
175 | struct ceph_osd_data *osd_data; | 174 | struct ceph_osd_data *osd_data; |
176 | 175 | ||
177 | osd_data = osd_req_op_extent_osd_data(osd_req, which, write_request); | 176 | osd_data = osd_req_op_extent_osd_data(osd_req, which); |
178 | ceph_osd_data_pagelist_init(osd_data, pagelist); | 177 | ceph_osd_data_pagelist_init(osd_data, pagelist); |
179 | } | 178 | } |
180 | EXPORT_SYMBOL(osd_req_op_extent_osd_data_pagelist); | 179 | EXPORT_SYMBOL(osd_req_op_extent_osd_data_pagelist); |
181 | 180 | ||
182 | #ifdef CONFIG_BLOCK | 181 | #ifdef CONFIG_BLOCK |
183 | void osd_req_op_extent_osd_data_bio(struct ceph_osd_request *osd_req, | 182 | void osd_req_op_extent_osd_data_bio(struct ceph_osd_request *osd_req, |
184 | unsigned int which, bool write_request, | 183 | unsigned int which, struct bio *bio, size_t bio_length) |
185 | struct bio *bio, size_t bio_length) | ||
186 | { | 184 | { |
187 | struct ceph_osd_data *osd_data; | 185 | struct ceph_osd_data *osd_data; |
188 | 186 | osd_data = osd_req_op_extent_osd_data(osd_req, which); | |
189 | osd_data = osd_req_op_extent_osd_data(osd_req, which, write_request); | ||
190 | ceph_osd_data_bio_init(osd_data, bio, bio_length); | 187 | ceph_osd_data_bio_init(osd_data, bio, bio_length); |
191 | } | 188 | } |
192 | EXPORT_SYMBOL(osd_req_op_extent_osd_data_bio); | 189 | EXPORT_SYMBOL(osd_req_op_extent_osd_data_bio); |
@@ -2284,7 +2281,7 @@ int ceph_osdc_readpages(struct ceph_osd_client *osdc, | |||
2284 | 2281 | ||
2285 | /* it may be a short read due to an object boundary */ | 2282 | /* it may be a short read due to an object boundary */ |
2286 | 2283 | ||
2287 | osd_req_op_extent_osd_data_pages(req, 0, false, | 2284 | osd_req_op_extent_osd_data_pages(req, 0, |
2288 | pages, *plen, page_align, false, false); | 2285 | pages, *plen, page_align, false, false); |
2289 | 2286 | ||
2290 | dout("readpages final extent is %llu~%llu (%llu bytes align %d)\n", | 2287 | dout("readpages final extent is %llu~%llu (%llu bytes align %d)\n", |
@@ -2327,7 +2324,7 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino, | |||
2327 | return PTR_ERR(req); | 2324 | return PTR_ERR(req); |
2328 | 2325 | ||
2329 | /* it may be a short write due to an object boundary */ | 2326 | /* it may be a short write due to an object boundary */ |
2330 | osd_req_op_extent_osd_data_pages(req, 0, true, pages, len, page_align, | 2327 | osd_req_op_extent_osd_data_pages(req, 0, pages, len, page_align, |
2331 | false, false); | 2328 | false, false); |
2332 | dout("writepages %llu~%llu (%llu bytes)\n", off, len, len); | 2329 | dout("writepages %llu~%llu (%llu bytes)\n", off, len, len); |
2333 | 2330 | ||
@@ -2428,7 +2425,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con, | |||
2428 | * XXX page data. Probably OK for reads, but this | 2425 | * XXX page data. Probably OK for reads, but this |
2429 | * XXX ought to be done more generally. | 2426 | * XXX ought to be done more generally. |
2430 | */ | 2427 | */ |
2431 | osd_data = osd_req_op_extent_osd_data(req, 0, false); | 2428 | osd_data = osd_req_op_extent_osd_data(req, 0); |
2432 | if (osd_data->type == CEPH_OSD_DATA_TYPE_PAGES) { | 2429 | if (osd_data->type == CEPH_OSD_DATA_TYPE_PAGES) { |
2433 | if (osd_data->pages && | 2430 | if (osd_data->pages && |
2434 | unlikely(osd_data->length < data_len)) { | 2431 | unlikely(osd_data->length < data_len)) { |