summaryrefslogtreecommitdiff
path: root/net/ceph
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-04-15 14:50:36 -0500
committerSage Weil <sage@inktank.com>2013-05-01 21:18:58 -0700
commit406e2c9f9286fc93ae2191a7abf477dea05aadc9 (patch)
tree121034644585b0171bfd436d77fe988ad1704753 /net/ceph
parentac7f29bf2ee4a526efb68f947475ff77a43028de (diff)
libceph: kill off osd data write_request parameters
In the incremental move toward supporting distinct data items in an osd request some of the functions had "write_request" parameters to indicate, basically, whether the data belonged to in_data or the out_data. Now that we maintain the data fields in the op structure there is no need to indicate the direction, so get rid of the "write_request" parameters. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net/ceph')
-rw-r--r--net/ceph/osd_client.c25
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,
struct ceph_osd_data *
osd_req_op_extent_osd_data(struct ceph_osd_request *osd_req,
- unsigned int which, bool write_request)
+ unsigned int which)
{
BUG_ON(which >= osd_req->r_num_ops);
@@ -156,37 +156,34 @@ osd_req_op_cls_response_data(struct ceph_osd_request *osd_req,
EXPORT_SYMBOL(osd_req_op_cls_response_data); /* ??? */
void osd_req_op_extent_osd_data_pages(struct ceph_osd_request *osd_req,
- unsigned int which, bool write_request,
- struct page **pages, u64 length, u32 alignment,
+ unsigned int which, struct page **pages,
+ u64 length, u32 alignment,
bool pages_from_pool, bool own_pages)
{
struct ceph_osd_data *osd_data;
- osd_data = osd_req_op_extent_osd_data(osd_req, which, write_request);
+ osd_data = osd_req_op_extent_osd_data(osd_req, which);
ceph_osd_data_pages_init(osd_data, pages, length, alignment,
pages_from_pool, own_pages);
}
EXPORT_SYMBOL(osd_req_op_extent_osd_data_pages);
void osd_req_op_extent_osd_data_pagelist(struct ceph_osd_request *osd_req,
- unsigned int which, bool write_request,
- struct ceph_pagelist *pagelist)
+ unsigned int which, struct ceph_pagelist *pagelist)
{
struct ceph_osd_data *osd_data;
- osd_data = osd_req_op_extent_osd_data(osd_req, which, write_request);
+ osd_data = osd_req_op_extent_osd_data(osd_req, which);
ceph_osd_data_pagelist_init(osd_data, pagelist);
}
EXPORT_SYMBOL(osd_req_op_extent_osd_data_pagelist);
#ifdef CONFIG_BLOCK
void osd_req_op_extent_osd_data_bio(struct ceph_osd_request *osd_req,
- unsigned int which, bool write_request,
- struct bio *bio, size_t bio_length)
+ unsigned int which, struct bio *bio, size_t bio_length)
{
struct ceph_osd_data *osd_data;
-
- osd_data = osd_req_op_extent_osd_data(osd_req, which, write_request);
+ osd_data = osd_req_op_extent_osd_data(osd_req, which);
ceph_osd_data_bio_init(osd_data, bio, bio_length);
}
EXPORT_SYMBOL(osd_req_op_extent_osd_data_bio);
@@ -2284,7 +2281,7 @@ int ceph_osdc_readpages(struct ceph_osd_client *osdc,
/* it may be a short read due to an object boundary */
- osd_req_op_extent_osd_data_pages(req, 0, false,
+ osd_req_op_extent_osd_data_pages(req, 0,
pages, *plen, page_align, false, false);
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,
return PTR_ERR(req);
/* it may be a short write due to an object boundary */
- osd_req_op_extent_osd_data_pages(req, 0, true, pages, len, page_align,
+ osd_req_op_extent_osd_data_pages(req, 0, pages, len, page_align,
false, false);
dout("writepages %llu~%llu (%llu bytes)\n", off, len, len);
@@ -2428,7 +2425,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
* XXX page data. Probably OK for reads, but this
* XXX ought to be done more generally.
*/
- osd_data = osd_req_op_extent_osd_data(req, 0, false);
+ osd_data = osd_req_op_extent_osd_data(req, 0);
if (osd_data->type == CEPH_OSD_DATA_TYPE_PAGES) {
if (osd_data->pages &&
unlikely(osd_data->length < data_len)) {