From patchwork Thu May 5 07:29:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 756192 Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p457WETf027385 for ; Thu, 5 May 2011 07:32:35 GMT 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 p457Trqj028356; Thu, 5 May 2011 03:29:55 -0400 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 p457TpZb004459 for ; Thu, 5 May 2011 03:29:51 -0400 Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p457TkH3001467 for ; Thu, 5 May 2011 03:29:46 -0400 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 p457TjDs005874 for ; Thu, 5 May 2011 03:29:45 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 8CD018980B; Thu, 5 May 2011 09:29:44 +0200 (CEST) From: Hannes Reinecke Message-Id: <201105050729.p457TV6N029923@pentland.suse.de> Date: Thu, 05 May 2011 09:29:31 +0200 To: Christophe Varoqui User-Agent: Heirloom mailx 12.2 01/07/07 MIME-Version: 1.0 X-RedHat-Spam-Score: -2.31 (RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.18 Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH] Return PATH_UP for non-SCSI devices in path_offline() 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: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 05 May 2011 07:32:35 +0000 (UTC) path_offline() only makes sense for SCSI devices, as non of the other types can detect the path state. Signed-off-by: Hannes Reinecke --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index aa25cc4..a93f08c 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -706,6 +706,10 @@ path_offline (struct path * pp) struct sysfs_device * parent; char buff[SCSI_STATE_SIZE]; + if (pp->bus != SYSFS_BUS_SCSI) + /* No information for non-SCSI devices, return UP */ + return PATH_UP; + pp->sysdev = sysfs_device_from_path(pp); if (!pp->sysdev) { condlog(1, "%s: failed to get sysfs information", pp->dev);