From patchwork Wed Apr 13 21:35:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 65765 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp247422qge; Wed, 13 Apr 2016 14:38:02 -0700 (PDT) X-Received: by 10.140.177.87 with SMTP id x84mr14923386qhx.39.1460583482113; Wed, 13 Apr 2016 14:38:02 -0700 (PDT) Return-Path: Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com. [209.132.183.39]) by mx.google.com with ESMTPS id x93si16249608qgx.37.2016.04.13.14.38.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Apr 2016 14:38:02 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.39 as permitted sender) client-ip=209.132.183.39; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.39 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3DLZI7r054001; Wed, 13 Apr 2016 17:35:19 -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 u3DLZG9w001203 for ; Wed, 13 Apr 2016 17:35:16 -0400 Received: from colepc.redhat.com (ovpn-113-40.phx2.redhat.com [10.3.113.40]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3DLZGxE003146; Wed, 13 Apr 2016 17:35:16 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 13 Apr 2016 17:35:13 -0400 Message-Id: <8b02d8e00d86809832c47de8ce3fb7502c30abac.1460583313.git.crobinso@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] storage: mpath: Don't error on target_type=NULL X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com We use device-mapper to enumerate all dm devices, and filter out the list of multipath devices by checking the target_type string name. The code however cancels all scanning if we encounter target_type=NULL I don't know how to reproduce that situation, but a user was hitting it in their setup, and inspecting the lvm2/device-mapper code shows many places where !target_type is explicitly ignored and processing continues on to the next device. So I think we should do the same https://bugzilla.redhat.com/show_bug.cgi?id=1069317 --- src/storage/storage_backend_mpath.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.7.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/storage/storage_backend_mpath.c b/src/storage/storage_backend_mpath.c index b5b4bb6..bf1b1ab 100644 --- a/src/storage/storage_backend_mpath.c +++ b/src/storage/storage_backend_mpath.c @@ -114,12 +114,7 @@ virStorageBackendIsMultipath(const char *dev_name) dm_get_next_target(dmt, next, &start, &length, &target_type, ¶ms); - if (target_type == NULL) { - ret = -1; - goto out; - } - - if (STREQ(target_type, "multipath")) + if (STREQ_NULLABLE(target_type, "multipath")) ret = 1; out: