From patchwork Wed Mar 19 16:09:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 3859851 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 17BC1BF549 for ; Wed, 19 Mar 2014 18:18:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4787C20122 for ; Wed, 19 Mar 2014 18:18:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E1C9920219 for ; Wed, 19 Mar 2014 18:18:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933988AbaCSQKd (ORCPT ); Wed, 19 Mar 2014 12:10:33 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:39570 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965667AbaCSQJR (ORCPT ); Wed, 19 Mar 2014 12:09:17 -0400 Received: by mail-ee0-f46.google.com with SMTP id t10so6678442eei.5 for ; Wed, 19 Mar 2014 09:09:16 -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=Yi6pnTwjQ/3sy1ib6j30n35uNqdm5K9xHXAOACURVMc=; b=MG0531qutzilIwkYmRcVwGQhAOvwQTSjpw6FSk+y36zwz0h6ZC6iiy1W+0i5lt9GsX opvNaB17wDHYYWsmbGX0VxfWCO4DYPD5Y642W99PyN5heOAgmjPpKee7xiZXETeV8BW0 sqjE2zWT/tfLl2GSTsGhDEw6zIToKoCuecgKucVMhyYzI+Kr2MXCo6vQupFjNEtjfFhW jZHX9rwbyZOVRksm/2w/3cMz7THWNCGR5oL8FYRpyrgr9AakqbGS6rhANKWanCxvxafI acggdXrlmaOuA8gZrX5YJo8NfInPBEJbIh3oKgLegLJC/8thuthQgx/xdUMO9PoAj3L8 kaAw== X-Gm-Message-State: ALoCoQlYTuw74ttgJ7wJyxzKXOCHozaQC1HaP/7JwHJNQflqG2cgax2sBvw3K1x+no21796rscXc X-Received: by 10.15.35.66 with SMTP id f42mr4106905eev.93.1395245356883; Wed, 19 Mar 2014 09:09:16 -0700 (PDT) Received: from localhost ([109.110.66.126]) by mx.google.com with ESMTPSA id w6sm55563017eex.9.2014.03.19.09.09.15 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 19 Mar 2014 09:09:16 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH 2/5] crush: allow crush rules to set (re)tries counts to 0 Date: Wed, 19 Mar 2014 18:09:06 +0200 Message-Id: <1395245349-4513-3-git-send-email-ilya.dryomov@inktank.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395245349-4513-1-git-send-email-ilya.dryomov@inktank.com> References: <1395245349-4513-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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 These two fields are misnomers; they are *retry* counts. Reflects ceph.git commit f17caba8ae0cad7b6f8f35e53e5f73b444696835. Signed-off-by: Ilya Dryomov --- net/ceph/crush/mapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c index 074bb2a5e675..b3fb84903b30 100644 --- a/net/ceph/crush/mapper.c +++ b/net/ceph/crush/mapper.c @@ -684,12 +684,12 @@ int crush_do_rule(const struct crush_map *map, break; case CRUSH_RULE_SET_CHOOSE_LOCAL_TRIES: - if (curstep->arg1 > 0) + if (curstep->arg1 >= 0) choose_local_retries = curstep->arg1; break; case CRUSH_RULE_SET_CHOOSE_LOCAL_FALLBACK_TRIES: - if (curstep->arg1 > 0) + if (curstep->arg1 >= 0) choose_local_fallback_retries = curstep->arg1; break;