From patchwork Tue Jan 8 13:54:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 1946241 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by patchwork2.kernel.org (Postfix) with ESMTP id 7DA76DF23A for ; Tue, 8 Jan 2013 13:59:01 +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 r08Dtmt1002189; Tue, 8 Jan 2013 08:55:48 -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 r08DsXnq004635 for ; Tue, 8 Jan 2013 08:54:33 -0500 Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r08DsXBx024521 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 r08DsWN4016458 for ; Tue, 8 Jan 2013 08:54:32 -0500 Received: from relay2.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 F1487A51FF; Tue, 8 Jan 2013 14:54:28 +0100 (CET) From: Hannes Reinecke To: Christophe Varoqui Date: Tue, 8 Jan 2013 14:54:01 +0100 Message-Id: <1357653259-62650-24-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.23 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.18 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 23/42] Path checker should return PATH_DOWN when no path is found 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 If the path checker fails to lookup the path in sysfs it's already gone, so we should rather return 'PATH_DOWN' here. Otherwise the path will never marked failed and no failover will happen. Signed-off-by: Hannes Reinecke --- libmultipath/discovery.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 6848b70..7ed8556 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -659,11 +659,11 @@ path_offline (struct path * pp) if (!parent) { condlog(1, "%s: failed to get sysfs information", pp->dev); - return PATH_WILD; + return PATH_DOWN; } if (sysfs_get_state(parent, buff, SCSI_STATE_SIZE)) - return PATH_WILD; + return PATH_DOWN; condlog(3, "%s: path state = %s", pp->dev, buff);