From nobody Sun Feb 8 10:03:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594893964; cv=none; d=zohomail.com; s=zohoarc; b=HCEc1JoJaLSCFeUH7mXfc9MDxLK4FWWpS6Rc7rlFTVMEmFwZxUlJ5JLo2MynEr1MFE+XaPZseC45gjcT83krKteyq0U60VDtIR9jHpwHcV0+zun09fiMojoUs11ICwnDVhnbyAqxNNtAH5qLW7EFwoV86bGbSPG5LflwUMh7fzM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594893964; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RvCkc2DvH9FFIkdGKf6TTUWwury2ZdSW99R8U7cGp8k=; b=Al3iTenL7Srj8vHUQa8Sx4kh2o7Vwh3fdt1e+nfKnUo9s6cVdFP2HqIHG4Uv78y1bD/ue9GSggaR3J+yod+d3J6DTtpIFN8h2voNH+UFFNEki0w2NDYBHc5Lplw2JMJ2mLfFXNkQl0IFdsTDEwkO/8J0COIXOTZqXoOCm7eOdPg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1594893964903169.73390328031144; Thu, 16 Jul 2020 03:06:04 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-85-WeXVSMSuPXiowm0w4pNofQ-1; Thu, 16 Jul 2020 06:03:22 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8E93A15D2B; Thu, 16 Jul 2020 10:03:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1395A61788; Thu, 16 Jul 2020 10:03:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CC49296242; Thu, 16 Jul 2020 10:03:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.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 06GA36th016947 for ; Thu, 16 Jul 2020 06:03:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6519A2DE72; Thu, 16 Jul 2020 10:03:06 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id D44152DE71 for ; Thu, 16 Jul 2020 10:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594893963; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=RvCkc2DvH9FFIkdGKf6TTUWwury2ZdSW99R8U7cGp8k=; b=E2JrRO11Ik2LkCHOJMBbdWfWLVqn5gk5D8efq/W9Nt/QaVUxA7p4Jf2awQ6Ul0tPKLVtjZ /liD3gbQla+pL5bKGw3KGBwimw0VZc4w+7DEEW+IOEDjh/gxiO4h3k4m4EZJm7PfEV1KBR oz6fG6cRkQ5vVOf1gtW6hUc6Y+4XW60= X-MC-Unique: WeXVSMSuPXiowm0w4pNofQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 106/351] meson: add storage mpath build options Date: Thu, 16 Jul 2020 11:55:42 +0200 Message-Id: <71bc871c54b4ab036dd69fc1190f8eb785b0a32b.1594891445.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- configure.ac | 4 --- m4/virt-storage-mpath.m4 | 53 ---------------------------------------- meson.build | 8 ++++++ meson_options.txt | 1 + 4 files changed, 9 insertions(+), 57 deletions(-) delete mode 100644 m4/virt-storage-mpath.m4 diff --git a/configure.ac b/configure.ac index acfad8737ee..465d9974ac4 100644 --- a/configure.ac +++ b/configure.ac @@ -137,7 +137,6 @@ dnl Storage driver checks dnl =20 LIBVIRT_STORAGE_ARG_SCSI -LIBVIRT_STORAGE_ARG_MPATH LIBVIRT_STORAGE_ARG_RBD LIBVIRT_STORAGE_ARG_SHEEPDOG LIBVIRT_STORAGE_ARG_ZFS @@ -145,7 +144,6 @@ LIBVIRT_STORAGE_ARG_VSTORAGE =20 if test "$with_libvirtd" =3D "no"; then with_storage_scsi=3Dno - with_storage_mpath=3Dno with_storage_rbd=3Dno with_storage_sheepdog=3Dno with_storage_zfs=3Dno @@ -153,7 +151,6 @@ if test "$with_libvirtd" =3D "no"; then fi =20 LIBVIRT_STORAGE_CHECK_SCSI -LIBVIRT_STORAGE_CHECK_MPATH LIBVIRT_STORAGE_CHECK_RBD LIBVIRT_STORAGE_CHECK_SHEEPDOG LIBVIRT_STORAGE_CHECK_ZFS @@ -216,7 +213,6 @@ AC_MSG_NOTICE([]) AC_MSG_NOTICE([Storage Drivers]) AC_MSG_NOTICE([]) LIBVIRT_STORAGE_RESULT_SCSI -LIBVIRT_STORAGE_RESULT_MPATH LIBVIRT_STORAGE_RESULT_RBD LIBVIRT_STORAGE_RESULT_SHEEPDOG LIBVIRT_STORAGE_RESULT_ZFS diff --git a/m4/virt-storage-mpath.m4 b/m4/virt-storage-mpath.m4 deleted file mode 100644 index d4f8ecfb9ea..00000000000 --- a/m4/virt-storage-mpath.m4 +++ /dev/null @@ -1,53 +0,0 @@ -dnl The storage mpath check -dnl -dnl Copyright (C) 2016 Red Hat, Inc. -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library. If not, see -dnl . -dnl - -AC_DEFUN([LIBVIRT_STORAGE_ARG_MPATH], [ - LIBVIRT_ARG_WITH_FEATURE([STORAGE_MPATH], [mpath backend for the storage= driver], - [check]) -]) - -AC_DEFUN([LIBVIRT_STORAGE_CHECK_MPATH], [ - AC_REQUIRE([LIBVIRT_CHECK_DEVMAPPER]) - - if test "$with_storage_mpath" =3D "check" || test "$with_storage_mpath" = =3D "yes"; then - if test "$with_linux" =3D "yes"; then - with_storage_mpath=3Dyes - - AC_DEFINE_UNQUOTED([WITH_STORAGE_MPATH], 1, - [whether mpath backend for storage driver is enabled]) - else - if test "$with_storage_mpath" =3D "yes"; then - AC_MSG_ERROR([mpath storage is only supported on Linux]) - fi - with_storage_mpath=3Dno - fi - fi - - if test "x$with_storage_mpath" =3D "xyes"; then - if test "x$with_devmapper" =3D "xno"; then - AC_MSG_ERROR([You must install device-mapper-devel/libdevmapper to c= ompile libvirt with mpath storage driver]) - fi - fi - - AM_CONDITIONAL([WITH_STORAGE_MPATH], [test "$with_storage_mpath" =3D "ye= s"]) -]) - -AC_DEFUN([LIBVIRT_STORAGE_RESULT_MPATH], [ - LIBVIRT_RESULT([mpath], [$with_storage_mpath]) -]) diff --git a/meson.build b/meson.build index cecc161ed85..c30026bc696 100644 --- a/meson.build +++ b/meson.build @@ -1969,6 +1969,13 @@ if conf.has('WITH_LIBVIRTD') endforeach endif endif + + if not get_option('storage_mpath').disabled() and host_machine.system() = =3D=3D 'linux' and devmapper_dep.found() + use_storage =3D true + conf.set('WITH_STORAGE_MPATH', 1) + elif get_option('storage_mpath').enabled() + error('mpath storage driver is supported only on Linux and you must in= stall libdevmapper') + endif endif =20 if use_storage @@ -2020,6 +2027,7 @@ storagedriver_summary =3D { 'LVM': conf.has('WITH_STORAGE_LVM'), 'iSCSI': conf.has('WITH_STORAGE_ISCSI'), 'iscsi-direct': conf.has('WITH_STORAGE_ISCSI_DIRECT'), + 'mpath': conf.has('WITH_STORAGE_MPATH'), 'Disk': conf.has('WITH_STORAGE_DISK'), 'Gluster': conf.has('WITH_STORAGE_GLUSTER'), } diff --git a/meson_options.txt b/meson_options.txt index 66e232f59dc..97e18987860 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -81,3 +81,4 @@ option('storage_gluster', type: 'feature', value: 'auto',= description: 'Gluster option('storage_iscsi', type: 'feature', value: 'auto', description: 'iscs= i backend for the storage driver') option('storage_iscsi_direct', type: 'feature', value: 'auto', description= : 'iscsi-direct backend for the storage driver') option('storage_lvm', type: 'feature', value: 'auto', description: 'LVM ba= ckend for the storage driver') +option('storage_mpath', type: 'feature', value: 'auto', description: 'mpat= h backend for the storage driver') --=20 2.26.2