aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-04-03 02:28:58 -0400
committerSage Weil <sage@inktank.com>2013-05-02 00:18:13 -0400
commit54d5064912649e296552f298e6472ffd37cd8f90 (patch)
tree1fd2997fff2c1fb959e22d329a14ae9a4822ee11 /net/ceph/osd_client.c
parent79528734f3ae4699a2886f62f55e18fb34fb3651 (diff)
libceph: rename data out field in osd request op
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> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net/ceph/osd_client.c')
-rw-r--r--net/ceph/osd_client.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index a498d2de17a4..87fcf0b795c0 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,
395 op->cls.method_len = size; 395 op->cls.method_len = size;
396 payload_len += size; 396 payload_len += size;
397 397
398 op->cls.indata = request_data; 398 op->cls.request_data = request_data;
399 BUG_ON(request_data_size > (size_t) U32_MAX); 399 BUG_ON(request_data_size > (size_t) U32_MAX);
400 op->cls.indata_len = (u32) request_data_size; 400 op->cls.request_data_len = (u32) request_data_size;
401 payload_len += request_data_size; 401 payload_len += request_data_size;
402 402
403 op->cls.argc = 0; /* currently unused */ 403 op->cls.argc = 0; /* currently unused */
@@ -425,7 +425,7 @@ static u64 osd_req_encode_op(struct ceph_osd_request *req,
425 struct ceph_osd_op *dst, unsigned int which) 425 struct ceph_osd_op *dst, unsigned int which)
426{ 426{
427 struct ceph_osd_req_op *src; 427 struct ceph_osd_req_op *src;
428 u64 out_data_len = 0; 428 u64 request_data_len = 0;
429 struct ceph_pagelist *pagelist; 429 struct ceph_pagelist *pagelist;
430 430
431 BUG_ON(which >= req->r_num_ops); 431 BUG_ON(which >= req->r_num_ops);
@@ -442,7 +442,7 @@ static u64 osd_req_encode_op(struct ceph_osd_request *req,
442 case CEPH_OSD_OP_READ: 442 case CEPH_OSD_OP_READ:
443 case CEPH_OSD_OP_WRITE: 443 case CEPH_OSD_OP_WRITE:
444 if (src->op == CEPH_OSD_OP_WRITE) 444 if (src->op == CEPH_OSD_OP_WRITE)
445 out_data_len = src->extent.length; 445 request_data_len = src->extent.length;
446 dst->extent.offset = cpu_to_le64(src->extent.offset); 446 dst->extent.offset = cpu_to_le64(src->extent.offset);
447 dst->extent.length = cpu_to_le64(src->extent.length); 447 dst->extent.length = cpu_to_le64(src->extent.length);
448 dst->extent.truncate_size = 448 dst->extent.truncate_size =
@@ -457,16 +457,16 @@ static u64 osd_req_encode_op(struct ceph_osd_request *req,
457 457
458 dst->cls.class_len = src->cls.class_len; 458 dst->cls.class_len = src->cls.class_len;
459 dst->cls.method_len = src->cls.method_len; 459 dst->cls.method_len = src->cls.method_len;
460 dst->cls.indata_len = cpu_to_le32(src->cls.indata_len); 460 dst->cls.indata_len = cpu_to_le32(src->cls.request_data_len);
461 ceph_pagelist_append(pagelist, src->cls.class_name, 461 ceph_pagelist_append(pagelist, src->cls.class_name,
462 src->cls.class_len); 462 src->cls.class_len);
463 ceph_pagelist_append(pagelist, src->cls.method_name, 463 ceph_pagelist_append(pagelist, src->cls.method_name,
464 src->cls.method_len); 464 src->cls.method_len);
465 ceph_pagelist_append(pagelist, src->cls.indata, 465 ceph_pagelist_append(pagelist, src->cls.request_data,
466 src->cls.indata_len); 466 src->cls.request_data_len);
467 467
468 ceph_osd_data_pagelist_init(&req->r_data_out, pagelist); 468 ceph_osd_data_pagelist_init(&req->r_data_out, pagelist);
469 out_data_len = pagelist->length; 469 request_data_len = pagelist->length;
470 break; 470 break;
471 case CEPH_OSD_OP_STARTSYNC: 471 case CEPH_OSD_OP_STARTSYNC:
472 break; 472 break;
@@ -486,7 +486,7 @@ static u64 osd_req_encode_op(struct ceph_osd_request *req,
486 dst->op = cpu_to_le16(src->op); 486 dst->op = cpu_to_le16(src->op);
487 dst->payload_len = cpu_to_le32(src->payload_len); 487 dst->payload_len = cpu_to_le32(src->payload_len);
488 488
489 return out_data_len; 489 return request_data_len;
490} 490}
491 491
492/* 492/*