From patchwork Fri Apr 5 14:03:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2398721 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 423773FD8C for ; Fri, 5 Apr 2013 14:03:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161809Ab3DEODr (ORCPT ); Fri, 5 Apr 2013 10:03:47 -0400 Received: from mail-ia0-f170.google.com ([209.85.210.170]:51492 "EHLO mail-ia0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161757Ab3DEODr (ORCPT ); Fri, 5 Apr 2013 10:03:47 -0400 Received: by mail-ia0-f170.google.com with SMTP id h8so3275730iaa.29 for ; Fri, 05 Apr 2013 07:03:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=sYIrk22GukvxGQCzh6J/28Uz+xGs0wCIHfwmi5m/3mI=; b=HuwKFCj3uOJvJtcIcCIJLwedNqXJnzzjG1b6X9qSfkM02MuecwkzjlSoE5xO1SG0OQ bJ6MxdrRoajfC55NRRVrRQFGa3gunj63G5NJWMRPMVTB9dy3FOTiRSpvQ0ffbANj+JR4 Ng9MjsUYcvAnfamIzggyfeea4ES78ofz09ckAakMRIQice0C6xf9yAXNjSUBJUkOTiJM KJXX0lhFIKZUkL2BC+TgTDEmnZjDwQPANnfUlsfcuRXOJM/Jm1VTpeRcHFxVVCoK1H+O yCy3xsQL1Q0kdGp7+l0LZgpCd9ZvuXhfCNiXuuNh6jSgomEuTBamtAleI39EZeSX/K3l 8/pg== X-Received: by 10.50.16.202 with SMTP id i10mr1709504igd.33.1365170626699; Fri, 05 Apr 2013 07:03:46 -0700 (PDT) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPS id s8sm2790899igs.0.2013.04.05.07.03.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Apr 2013 07:03:45 -0700 (PDT) Message-ID: <515ED9BE.8050705@inktank.com> Date: Fri, 05 Apr 2013 09:03:42 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: "ceph-devel@vger.kernel.org" Subject: [PATCH 09/20] libceph: rename data out field in osd request op References: <515ED849.9060901@inktank.com> In-Reply-To: <515ED849.9060901@inktank.com> X-Gm-Message-State: ALoCoQmUGQKggNOn4H/F2Ksz79Bs2HeFt5GEqsxNfH8qAOwzzYefsaH3aciw+n/lsjaRlElD1dp4 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org 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 Reviewed-by: Josh Durgin --- 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; } /* 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;