From patchwork Tue Jan 8 13:54:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 1945991 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by patchwork2.kernel.org (Postfix) with ESMTP id A05C4DF23A for ; Tue, 8 Jan 2013 13:57:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r08DtxHf019951; Tue, 8 Jan 2013 08:55:59 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r08DsXqX004664 for ; Tue, 8 Jan 2013 08:54:33 -0500 Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.19]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r08DsX9T028074 for ; Tue, 8 Jan 2013 08:54:33 -0500 Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r08DsVR6003165 for ; Tue, 8 Jan 2013 08:54:32 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id DC977A5206; Tue, 8 Jan 2013 14:54:28 +0100 (CET) From: Hannes Reinecke To: Christophe Varoqui Date: Tue, 8 Jan 2013 14:54:00 +0100 Message-Id: <1357653259-62650-23-git-send-email-hare@suse.de> In-Reply-To: <1357653259-62650-1-git-send-email-hare@suse.de> References: <1357653259-62650-1-git-send-email-hare@suse.de> X-RedHat-Spam-Score: -7.299 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.19 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 22/42] libmultipath: prio keyword ignored for multipath config 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 When specifying the 'prio' keyword in the multipath section of the configuration file the value is ignored. Problem is that the 'wwid' value is set only after the call to select_prio(), so the correct definition couldn't been found in the config file. Signed-off-by: Hannes Reinecke --- libmultipath/discovery.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index b5df8e3..6848b70 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -891,6 +891,9 @@ pathinfo (struct path *pp, vector hwtable, int mask) } } + if (path_state == PATH_UP && (mask & DI_WWID) && !strlen(pp->wwid)) + get_uid(pp); + /* * Retrieve path priority, even for PATH_DOWN paths if it has never * been successfully obtained before. @@ -905,9 +908,6 @@ pathinfo (struct path *pp, vector hwtable, int mask) } } - if (path_state == PATH_UP && (mask & DI_WWID) && !strlen(pp->wwid)) - get_uid(pp); - return 0; blank: