From patchwork Fri Nov 15 10:29:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 3187561 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Original-To: patchwork-dm-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 5E78D9F432 for ; Fri, 15 Nov 2013 10:33:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8A266207D2 for ; Fri, 15 Nov 2013 10:33:28 +0000 (UTC) Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by mail.kernel.org (Postfix) with ESMTP id B7E1B207CF for ; Fri, 15 Nov 2013 10:33:23 +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 rAFAUIKr023591; Fri, 15 Nov 2013 05:30:19 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rAFAUGdI018569 for ; Fri, 15 Nov 2013 05:30:16 -0500 Received: from mx2.redhat.com (ext-mx01.extmail.prod.ext.rdu2.redhat.com [10.11.55.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rAFAU7tx011685 for ; Fri, 15 Nov 2013 05:30:13 -0500 Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by mx2.redhat.com (8.14.4/8.14.4) with ESMTP id rAFAU5We010125 for ; Fri, 15 Nov 2013 05:30:06 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B8F12A7995; Fri, 15 Nov 2013 11:30:01 +0100 (CET) From: Hannes Reinecke To: Christophe Varoqui Date: Fri, 15 Nov 2013 11:29:33 +0100 Message-Id: <1384511384-27642-3-git-send-email-hare@suse.de> In-Reply-To: <1384511384-27642-1-git-send-email-hare@suse.de> References: <1384511384-27642-1-git-send-email-hare@suse.de> X-RedHat-Spam-Score: -6.901 (BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.68 on 10.11.55.1 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 02/13] Set priority to '0' for PATH_BLOCKED or PATH_DOWN X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development 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-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 When a path is down or blocked we need to initialize the priority to '0'. Otherwise multipathd will discard the maps during reload and fail to start if all paths are temporarily down. Signed-off-by: Hannes Reinecke --- libmultipath/discovery.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 04e3ead..3292358 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -1117,6 +1117,9 @@ pathinfo (struct path *pp, vector hwtable, int mask) } else { condlog(3, "%s: path inaccessible", pp->dev); pp->chkrstate = pp->state = path_state; + if (path_state == PATH_PENDING || + path_state == PATH_DOWN) + pp->priority = 0; } }