From patchwork Mon Dec 23 17:09:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 3397551 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 84CE7C0D4A for ; Mon, 23 Dec 2013 17:11:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7324F206AD for ; Mon, 23 Dec 2013 17:11:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5156D205F1 for ; Mon, 23 Dec 2013 17:11:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757726Ab3LWRLR (ORCPT ); Mon, 23 Dec 2013 12:11:17 -0500 Received: from mail-ea0-f181.google.com ([209.85.215.181]:37242 "EHLO mail-ea0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757703Ab3LWRLO (ORCPT ); Mon, 23 Dec 2013 12:11:14 -0500 Received: by mail-ea0-f181.google.com with SMTP id m10so2464699eaj.40 for ; Mon, 23 Dec 2013 09:11:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+rHV1dWdq+WNF35LyyG8boUvItf0Ida0hSRdm9JzcKk=; b=i3CsFYu5GYaQS23T3y5oAINjxdZTYJomu0IFt50xcsNm/ZxT87+lV2waCFustUO8gE pEa+0DdZTHcU7LWLV+e8DLXoNUlHe35ZheFGF8BFrNsGIqI9a5MUYamCbmDtg2D7q8Gk k1CCkH4XJq6POMSLaPxKIGxTxQ/YnVWYPebjnsXhvIkUK2Hkxcqk453YzpaWldSIakod OjzYVPq86I0oPbcrLAnYLgg3LSpGcFJHwQT+a3BizW6Tkr8Rvw9tncELYnlCBQOXr5hR Gw4Pe/LepmOFR4ROTn5rqtxPilFKlEPb0DjKGj37TZ8l43sM1DK+GvcY5pas4TtDajRT c1pg== X-Gm-Message-State: ALoCoQlld33v5gDzP7IM4Mihw3FajUvTht2Ee+l5nbzSNDXu2CAJPJFigHvPaCXWp1W3r/s/VECH X-Received: by 10.15.54.130 with SMTP id t2mr3768707eew.72.1387818673469; Mon, 23 Dec 2013 09:11:13 -0800 (PST) Received: from localhost ([109.110.66.29]) by mx.google.com with ESMTPSA id a51sm47324523eeh.8.2013.12.23.09.11.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 23 Dec 2013 09:11:12 -0800 (PST) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Cc: Sage Weil , ilya.dryomov@inktank.com Subject: [PATCH 18/19] crush: attempts -> tries Date: Mon, 23 Dec 2013 19:09:49 +0200 Message-Id: <1387818590-30483-19-git-send-email-ilya.dryomov@inktank.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1387818590-30483-1-git-send-email-ilya.dryomov@inktank.com> References: <1387818590-30483-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.4 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 Reflects ceph.git commit ea3a0bb8b773360d73b8b77fa32115ef091c9857. Signed-off-by: Ilya Dryomov --- net/ceph/crush/mapper.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c index 8cde4818e18b..71ce4f12a7c9 100644 --- a/net/ceph/crush/mapper.c +++ b/net/ceph/crush/mapper.c @@ -298,8 +298,8 @@ static int crush_choose_firstn(const struct crush_map *map, const __u32 *weight, int weight_max, int x, int numrep, int type, int *out, int outpos, - unsigned int attempts, - unsigned int recurse_attempts, + unsigned int tries, + unsigned int recurse_tries, unsigned int local_tries, unsigned int local_fallback_tries, int recurse_to_leaf, @@ -388,7 +388,7 @@ static int crush_choose_firstn(const struct crush_map *map, weight, weight_max, x, outpos+1, 0, out2, outpos, - recurse_attempts, 0, + recurse_tries, 0, local_tries, local_fallback_tries, 0, @@ -423,7 +423,7 @@ reject: flocal <= in->size + local_fallback_tries) /* exhaustive bucket search */ retry_bucket = 1; - else if (ftotal <= attempts) + else if (ftotal <= tries) /* then retry descent */ retry_descent = 1; else @@ -461,8 +461,8 @@ static void crush_choose_indep(const struct crush_map *map, const __u32 *weight, int weight_max, int x, int left, int numrep, int type, int *out, int outpos, - unsigned int attempts, - unsigned int recurse_attempts, + unsigned int tries, + unsigned int recurse_tries, int recurse_to_leaf, int *out2, int parent_r) @@ -487,7 +487,7 @@ static void crush_choose_indep(const struct crush_map *map, out2[rep] = CRUSH_ITEM_UNDEF; } - for (ftotal = 0; left > 0 && ftotal < attempts; ftotal++) { + for (ftotal = 0; left > 0 && ftotal < tries; ftotal++) { for (rep = outpos; rep < endpos; rep++) { if (out[rep] != CRUSH_ITEM_UNDEF) continue; @@ -572,7 +572,7 @@ static void crush_choose_indep(const struct crush_map *map, weight, weight_max, x, 1, numrep, 0, out2, rep, - recurse_attempts, 0, + recurse_tries, 0, 0, NULL, r); if (out2[rep] == CRUSH_ITEM_NONE) { /* placed nothing; no leaf */