From patchwork Thu Mar 27 18:17:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 3899221 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EF7209F2E8 for ; Thu, 27 Mar 2014 18:18:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26F2920253 for ; Thu, 27 Mar 2014 18:18:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F88220225 for ; Thu, 27 Mar 2014 18:18:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757098AbaC0SSz (ORCPT ); Thu, 27 Mar 2014 14:18:55 -0400 Received: from mail-ee0-f49.google.com ([74.125.83.49]:61728 "EHLO mail-ee0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757067AbaC0SSy (ORCPT ); Thu, 27 Mar 2014 14:18:54 -0400 Received: by mail-ee0-f49.google.com with SMTP id c41so3202960eek.8 for ; Thu, 27 Mar 2014 11:18:53 -0700 (PDT) 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=zMWBmMU39Z9RJDCRjc3eaYT4Nh+P0h48axI1OonXKU8=; b=MaIjyh3OXI1eYk2IOVB1kf+zyoSPAr8AfvP/9tEWgBmHoQtGmq55gdskfmHwPvLHvs bbFRqxJh9PhJUjvHugnnsL4wSH6mf0x1TurQCRahpA4ty0Il4wJrzwpFHfw69uGR5QdB +Mrf6Mktd/I7B1GvmEr/I24sUYD5A3WVwaeqRywr3UdpN5ebcosSr5LJQsj8Niu3V3K3 Z7HIR86MbPrhLSNGXRuCbTNJ+Vyl7T4iNPTWVHY4ohqM/pB9elDFoqhCWe5N+Crfzuxt xvvVb5/IkStwUcJ2pMASIrshQuV9QXFhr2JJEsTtT9MoGPiCnpKgBq354lYBnfuLDWMA Y16Q== X-Gm-Message-State: ALoCoQkVH4ZnTki9F7OXAgurmnpsC2e8WmjtZCh9oddhosjPrHjC9yXiSGRFXm8f3dUQbLgCVE9Z X-Received: by 10.15.42.138 with SMTP id u10mr3083734eev.7.1395944333510; Thu, 27 Mar 2014 11:18:53 -0700 (PDT) Received: from localhost ([109.110.66.7]) by mx.google.com with ESMTPSA id 44sm5951850eek.30.2014.03.27.11.18.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 27 Mar 2014 11:18:52 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH 13/33] libceph: rename __decode_pool{, _names}() to decode_pool{, _names}() Date: Thu, 27 Mar 2014 20:17:59 +0200 Message-Id: <1395944299-21970-14-git-send-email-ilya.dryomov@inktank.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395944299-21970-1-git-send-email-ilya.dryomov@inktank.com> References: <1395944299-21970-1-git-send-email-ilya.dryomov@inktank.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To be in line with all the other osdmap decode helpers. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder --- net/ceph/osdmap.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index 6dd083906a1e..cd8f34abe7b7 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c @@ -506,7 +506,7 @@ static void __remove_pg_pool(struct rb_root *root, struct ceph_pg_pool_info *pi) kfree(pi); } -static int __decode_pool(void **p, void *end, struct ceph_pg_pool_info *pi) +static int decode_pool(void **p, void *end, struct ceph_pg_pool_info *pi) { u8 ev, cv; unsigned len, num; @@ -587,7 +587,7 @@ bad: return -EINVAL; } -static int __decode_pool_names(void **p, void *end, struct ceph_osdmap *map) +static int decode_pool_names(void **p, void *end, struct ceph_osdmap *map) { struct ceph_pg_pool_info *pi; u32 num, len; @@ -723,7 +723,7 @@ static int osdmap_decode(void **p, void *end, struct ceph_osdmap *map) goto bad; } pi->id = ceph_decode_64(p); - err = __decode_pool(p, end, pi); + err = decode_pool(p, end, pi); if (err < 0) { kfree(pi); goto bad; @@ -731,7 +731,8 @@ static int osdmap_decode(void **p, void *end, struct ceph_osdmap *map) __insert_pg_pool(&map->pg_pools, pi); } - err = __decode_pool_names(p, end, map); + /* pool_name */ + err = decode_pool_names(p, end, map); if (err) goto bad; @@ -943,12 +944,13 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end, pi->id = pool; __insert_pg_pool(&map->pg_pools, pi); } - err = __decode_pool(p, end, pi); + err = decode_pool(p, end, pi); if (err < 0) goto bad; } - err = __decode_pool_names(p, end, map); + /* new_pool_names */ + err = decode_pool_names(p, end, map); if (err) goto bad;