Message ID | 515ED9BE.8050705@inktank.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Reviewed-by: Josh Durgin <josh.durgin@inktank.com> On 04/05/2013 07:03 AM, Alex Elder wrote: > There are fields "indata" and "indata_len" defined the ceph osd > request op structure. The "in" part is with from the point of view > of the osd server, but is a little confusing here on the client > side. Change their names to use "request" instead of "in" to > indicate that it defines data provided with the request (as opposed > the data returned in the response). > > Rename the local variable in osd_req_encode_op() to match. > > Signed-off-by: Alex Elder <elder@inktank.com> > --- > include/linux/ceph/osd_client.h | 4 ++-- > net/ceph/osd_client.c | 18 +++++++++--------- > 2 files changed, 11 insertions(+), 11 deletions(-) > > diff --git a/include/linux/ceph/osd_client.h > b/include/linux/ceph/osd_client.h > index f4c1a2a..a9c4089 100644 > --- a/include/linux/ceph/osd_client.h > +++ b/include/linux/ceph/osd_client.h > @@ -91,8 +91,8 @@ struct ceph_osd_req_op { > struct { > const char *class_name; > const char *method_name; > - const void *indata; > - u32 indata_len; > + const void *request_data; > + u32 request_data_len; > __u8 class_len; > __u8 method_len; > __u8 argc; > diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c > index ed4493d..e74e454 100644 > --- a/net/ceph/osd_client.c > +++ b/net/ceph/osd_client.c > @@ -395,9 +395,9 @@ void osd_req_op_cls_init(struct ceph_osd_req_op *op, > u16 opcode, > op->cls.method_len = size; > payload_len += size; > > - op->cls.indata = request_data; > + op->cls.request_data = request_data; > BUG_ON(request_data_size > (size_t) U32_MAX); > - op->cls.indata_len = (u32) request_data_size; > + op->cls.request_data_len = (u32) request_data_size; > payload_len += request_data_size; > > op->cls.argc = 0; /* currently unused */ > @@ -425,7 +425,7 @@ static u64 osd_req_encode_op(struct ceph_osd_request > *req, > struct ceph_osd_op *dst, unsigned int which) > { > struct ceph_osd_req_op *src; > - u64 out_data_len = 0; > + u64 request_data_len = 0; > struct ceph_pagelist *pagelist; > > BUG_ON(which >= req->r_num_ops); > @@ -442,7 +442,7 @@ static u64 osd_req_encode_op(struct ceph_osd_request > *req, > case CEPH_OSD_OP_READ: > case CEPH_OSD_OP_WRITE: > if (src->op == CEPH_OSD_OP_WRITE) > - out_data_len = src->extent.length; > + request_data_len = src->extent.length; > dst->extent.offset = cpu_to_le64(src->extent.offset); > dst->extent.length = cpu_to_le64(src->extent.length); > dst->extent.truncate_size = > @@ -457,16 +457,16 @@ static u64 osd_req_encode_op(struct > ceph_osd_request *req, > > dst->cls.class_len = src->cls.class_len; > dst->cls.method_len = src->cls.method_len; > - dst->cls.indata_len = cpu_to_le32(src->cls.indata_len); > + dst->cls.indata_len = cpu_to_le32(src->cls.request_data_len); > ceph_pagelist_append(pagelist, src->cls.class_name, > src->cls.class_len); > ceph_pagelist_append(pagelist, src->cls.method_name, > src->cls.method_len); > - ceph_pagelist_append(pagelist, src->cls.indata, > - src->cls.indata_len); > + ceph_pagelist_append(pagelist, src->cls.request_data, > + src->cls.request_data_len); > > ceph_osd_data_pagelist_init(&req->r_data_out, pagelist); > - out_data_len = pagelist->length; > + request_data_len = pagelist->length; > break; > case CEPH_OSD_OP_STARTSYNC: > break; > @@ -486,7 +486,7 @@ static u64 osd_req_encode_op(struct ceph_osd_request > *req, > dst->op = cpu_to_le16(src->op); > dst->payload_len = cpu_to_le32(src->payload_len); > > - return out_data_len; > + return request_data_len; > } > > /* > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index f4c1a2a..a9c4089 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h @@ -91,8 +91,8 @@ struct ceph_osd_req_op { struct { const char *class_name; const char *method_name; - const void *indata; - u32 indata_len; + const void *request_data; + u32 request_data_len; __u8 class_len; __u8 method_len; __u8 argc; diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index ed4493d..e74e454 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -395,9 +395,9 @@ void osd_req_op_cls_init(struct ceph_osd_req_op *op, u16 opcode, op->cls.method_len = size; payload_len += size; - op->cls.indata = request_data; + op->cls.request_data = request_data; BUG_ON(request_data_size > (size_t) U32_MAX); - op->cls.indata_len = (u32) request_data_size; + op->cls.request_data_len = (u32) request_data_size; payload_len += request_data_size;
There are fields "indata" and "indata_len" defined the ceph osd request op structure. The "in" part is with from the point of view of the osd server, but is a little confusing here on the client side. Change their names to use "request" instead of "in" to indicate that it defines data provided with the request (as opposed the data returned in the response). Rename the local variable in osd_req_encode_op() to match. Signed-off-by: Alex Elder <elder@inktank.com> --- include/linux/ceph/osd_client.h | 4 ++-- net/ceph/osd_client.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) op->cls.argc = 0; /* currently unused */ @@ -425,7 +425,7 @@ static u64 osd_req_encode_op(struct ceph_osd_request *req, struct ceph_osd_op *dst, unsigned int which) { struct ceph_osd_req_op *src; - u64 out_data_len = 0; + u64 request_data_len = 0; struct ceph_pagelist *pagelist; BUG_ON(which >= req->r_num_ops); @@ -442,7 +442,7 @@ static u64 osd_req_encode_op(struct ceph_osd_request *req, case CEPH_OSD_OP_READ: case CEPH_OSD_OP_WRITE: if (src->op == CEPH_OSD_OP_WRITE) - out_data_len = src->extent.length; + request_data_len = src->extent.length; dst->extent.offset = cpu_to_le64(src->extent.offset); dst->extent.length = cpu_to_le64(src->extent.length); dst->extent.truncate_size = @@ -457,16 +457,16 @@ static u64 osd_req_encode_op(struct ceph_osd_request *req, dst->cls.class_len = src->cls.class_len; dst->cls.method_len = src->cls.method_len; - dst->cls.indata_len = cpu_to_le32(src->cls.indata_len); + dst->cls.indata_len = cpu_to_le32(src->cls.request_data_len); ceph_pagelist_append(pagelist, src->cls.class_name, src->cls.class_len); ceph_pagelist_append(pagelist, src->cls.method_name, src->cls.method_len); - ceph_pagelist_append(pagelist, src->cls.indata, - src->cls.indata_len); + ceph_pagelist_append(pagelist, src->cls.request_data, + src->cls.request_data_len); ceph_osd_data_pagelist_init(&req->r_data_out, pagelist); - out_data_len = pagelist->length; + request_data_len = pagelist->length; break; case CEPH_OSD_OP_STARTSYNC: break; @@ -486,7 +486,7 @@ static u64 osd_req_encode_op(struct ceph_osd_request *req, dst->op = cpu_to_le16(src->op); dst->payload_len = cpu_to_le32(src->payload_len); - return out_data_len; + return request_data_len; } /*