From patchwork Sat Feb 11 05:28:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 9567849 X-Patchwork-Delegate: christophe.varoqui@free.fr 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 81EB360572 for ; Sat, 11 Feb 2017 05:30:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 736CF2853B for ; Sat, 11 Feb 2017 05:30:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 686A9285DA; Sat, 11 Feb 2017 05:30:53 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2ED1F2853B for ; Sat, 11 Feb 2017 05:30:53 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1B5TiRt024489; Sat, 11 Feb 2017 00:29:44 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1B5T1Km015665 for ; Sat, 11 Feb 2017 00:29:01 -0500 Received: from redhat.com (octiron.msp.redhat.com [10.15.80.209]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id v1B5T0GX028410; Sat, 11 Feb 2017 00:29:00 -0500 Received: by redhat.com (sSMTP sendmail emulation); Fri, 10 Feb 2017 23:28:59 -0600 From: "Benjamin Marzinski" To: device-mapper development Date: Fri, 10 Feb 2017 23:28:49 -0600 Message-Id: <1486790932-30917-5-git-send-email-bmarzins@redhat.com> In-Reply-To: <1486790932-30917-1-git-send-email-bmarzins@redhat.com> References: <1486790932-30917-1-git-send-email-bmarzins@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-loop: dm-devel@redhat.com Subject: [dm-devel] [PATCH 4/7] multipathd: don't update priority of failed paths X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP Multipathd shouldn't be updating the priority of failed paths in the checkerloop. The current avoids this in almost all cases, but not all. Close the loophole. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/multipathd/main.c b/multipathd/main.c index adc3258..5480e96 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1457,7 +1457,8 @@ int update_prio(struct path *pp, int refresh_all) } oldpriority = pp->priority; conf = get_multipath_config(); - pathinfo(pp, conf, DI_PRIO); + if (pp->state != PATH_DOWN) + pathinfo(pp, conf, DI_PRIO); put_multipath_config(conf); if (pp->priority == oldpriority)