From patchwork Wed Aug 24 13:18:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 9297799 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 50A2060757 for ; Wed, 24 Aug 2016 13:36:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4213528F2A for ; Wed, 24 Aug 2016 13:36:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36EB328F3B; Wed, 24 Aug 2016 13:36:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2A2B28F2A for ; Wed, 24 Aug 2016 13:36:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932184AbcHXNgf (ORCPT ); Wed, 24 Aug 2016 09:36:35 -0400 Received: from mail-yb0-f196.google.com ([209.85.213.196]:33374 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932727AbcHXNgf (ORCPT ); Wed, 24 Aug 2016 09:36:35 -0400 Received: by mail-yb0-f196.google.com with SMTP id e31so460028ybi.0 for ; Wed, 24 Aug 2016 06:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=Xss5n5aay/i6BJquOIXM6pCtGxXDaScBBHXz/mDrkfo=; b=iUJFWyQyujIpgcqHrW1JlG5OCjKTMkZGf3JbPI6OuYMhmwflRsnuAurV7lvPGbEfrY xxBR2LsLFXA/x42VZRIRjo4yPbdvZR9Yyl+/yMBrBM3D8T8MKOgnvCw3ebpQShnZHQbI k2NtrmoPy/AeogTvtOPp4f4azLBhOwaTCUaXuHinIa1Fx3db26SaOu02ZshtcXSKcbBl aULr8QdAtYLCjLKDnzksdqlnVARCU4Jjgv0Hqju8sd2y4NYcZhHH3fZItlMC3bSYe964 ts8QnCl6mSv2lRie1drqJklK9T3ZcwOzayY0bfk4l1bJhn2WpN45KCOAOSyeAss7yFSq A3EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Xss5n5aay/i6BJquOIXM6pCtGxXDaScBBHXz/mDrkfo=; b=IJBN47lnNsvL/j7aumTF5jdaia1VRbt8bEIFt4XWuzT4D3YRfyyFJY0MBiFxFRLQzT EnDjy6Ac7Sc23AHlai3Skvh7RSVLeS4uH1aZGf3SLErqAa0qTEXEYgN7/4JHY9DSM46f sKfAy/UwUuLoinQnQ9Qq4wjqmMl3VdwbbCcWt/FjKDFE0lA+DsE1FETn1GCU3aqLS5cu 7khDCdWzZJ0o6fTodC8tfYk6ReT0nnZZwH7plJA0H9ArDNbLExY3awySFBfKViGp9b6r +Dli73wlPRdpo4ogWLKF5sOPa84y1YcUoK5B3iV+5MHrJTg6Ma5svS8G4HqG62ud7rgg FjIg== X-Gm-Message-State: AEkoouvD4N/YcJzMpn6Cg8ba5AcsquGw7F6uvpjSD7cuRlQ53AcIEMIDDIhDQV5GTKKMQQ== X-Received: by 10.37.160.99 with SMTP id x90mr2326256ybh.130.1472044733508; Wed, 24 Aug 2016 06:18:53 -0700 (PDT) Received: from dhcp-1-219.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id e197sm5371294ywa.16.2016.08.24.06.18.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Aug 2016 06:18:52 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH 01/16] libceph: rename ceph_entity_name_encode() -> ceph_auth_entity_name_encode() Date: Wed, 24 Aug 2016 15:18:25 +0200 Message-Id: <1472044720-29116-2-git-send-email-idryomov@gmail.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1472044720-29116-1-git-send-email-idryomov@gmail.com> References: <1472044720-29116-1-git-send-email-idryomov@gmail.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clear up EntityName vs entity_name_t confusion. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder --- include/linux/ceph/auth.h | 2 +- net/ceph/auth.c | 7 +++++-- net/ceph/auth_none.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/linux/ceph/auth.h b/include/linux/ceph/auth.h index 1563265d2097..374bb1c4ef52 100644 --- a/include/linux/ceph/auth.h +++ b/include/linux/ceph/auth.h @@ -104,7 +104,7 @@ extern int ceph_auth_build_hello(struct ceph_auth_client *ac, extern int ceph_handle_auth_reply(struct ceph_auth_client *ac, void *buf, size_t len, void *reply_buf, size_t reply_len); -extern int ceph_entity_name_encode(const char *name, void **p, void *end); +int ceph_auth_entity_name_encode(const char *name, void **p, void *end); extern int ceph_build_auth(struct ceph_auth_client *ac, void *msg_buf, size_t msg_len); diff --git a/net/ceph/auth.c b/net/ceph/auth.c index 2bc5965fdd1e..78067dda9d3c 100644 --- a/net/ceph/auth.c +++ b/net/ceph/auth.c @@ -82,7 +82,10 @@ void ceph_auth_reset(struct ceph_auth_client *ac) mutex_unlock(&ac->mutex); } -int ceph_entity_name_encode(const char *name, void **p, void *end) +/* + * EntityName, not to be confused with entity_name_t + */ +int ceph_auth_entity_name_encode(const char *name, void **p, void *end) { int len = strlen(name); @@ -124,7 +127,7 @@ int ceph_auth_build_hello(struct ceph_auth_client *ac, void *buf, size_t len) for (i = 0; i < num; i++) ceph_encode_32(&p, supported_protocols[i]); - ret = ceph_entity_name_encode(ac->name, &p, end); + ret = ceph_auth_entity_name_encode(ac->name, &p, end); if (ret < 0) goto out; ceph_decode_need(&p, end, sizeof(u64), bad); diff --git a/net/ceph/auth_none.c b/net/ceph/auth_none.c index 5f836f02ae36..df45e467c81f 100644 --- a/net/ceph/auth_none.c +++ b/net/ceph/auth_none.c @@ -46,7 +46,7 @@ static int ceph_auth_none_build_authorizer(struct ceph_auth_client *ac, int ret; ceph_encode_8_safe(&p, end, 1, e_range); - ret = ceph_entity_name_encode(ac->name, &p, end); + ret = ceph_auth_entity_name_encode(ac->name, &p, end); if (ret < 0) return ret;