From nobody Thu Apr 25 08:52:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1562827890; cv=none; d=zoho.com; s=zohoarc; b=EuNhBTzzY0wZrcaLoGdOoYFPi86XAUyDo28g0A+v+anpGBlj0BYfwADZDI1euAq487SW5O7Q0YJn1D3VvHCggJ20AittiwdxZd1DfGvLy5zqQkfhxf8GLqLqaSt51yXmDM1gG8G6r0VRkp3gvTcpOAOcZ5DvZODmCltBirWxfiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562827890; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=E/Qhlvl1kcx57uGzpk3lXUXntdK+HwH/XtWSRu+6wWQ=; b=BvLluckLSpWpgJFIUjL6FQIfMuT9cutid/luh2NeY6e60GHlrgJHmnV2KOtHkWYXy6K4pF2NsjG4MEdJBHLS7lXHaI5ZfwYx4/mrLmVv52CSQG2z6lDT1H+W+WqIQjiLinPxNPIUNhy6RSC3cm2Ru1gVIcFaB5r+RrULGvjhot8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562827890294232.3504617806317; Wed, 10 Jul 2019 23:51:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 46A1330C34D1; Thu, 11 Jul 2019 06:51:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97E73194A8; Thu, 11 Jul 2019 06:51:27 +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 ED10818184AC; Thu, 11 Jul 2019 06:51:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6B6pOJm006783 for ; Thu, 11 Jul 2019 02:51:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1C2FA5C232; Thu, 11 Jul 2019 06:51:24 +0000 (UTC) Received: from hansolo.nay.redhat.com (unknown [10.66.4.171]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D5A05C221; Thu, 11 Jul 2019 06:51:20 +0000 (UTC) From: Han Han To: libvir-list@redhat.com Date: Thu, 11 Jul 2019 14:51:06 +0800 Message-Id: <20190711065106.8298-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Han Han Subject: [libvirt] [PATCH] storage: Add iscsi-direct pool list type flag 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 11 Jul 2019 06:51:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Add pool list type flag VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT, which was forgotten when introducing iscsi-direct pool at f0bf1be3. https://bugzilla.redhat.com/show_bug.cgi?id=3D1726609 Signed-off-by: Han Han --- include/libvirt/libvirt-storage.h | 1 + src/conf/storage_conf.h | 3 ++- src/conf/virstorageobj.c | 4 +++- src/libvirt-storage.c | 1 + tools/virsh-pool.c | 2 +- tools/virsh.pod | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-st= orage.h index 5a95b2b139..089e1e0bd1 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -244,6 +244,7 @@ typedef enum { VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER =3D 1 << 16, VIR_CONNECT_LIST_STORAGE_POOLS_ZFS =3D 1 << 17, VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE =3D 1 << 18, + VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT =3D 1 << 19, } virConnectListAllStoragePoolsFlags; =20 int virConnectListAllStoragePools(virConnectPtr conn, diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index 338e70244d..f399ac6192 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -484,7 +484,8 @@ VIR_ENUM_DECL(virStoragePartedFs); VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG | \ VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER | \ VIR_CONNECT_LIST_STORAGE_POOLS_ZFS | \ - VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE) + VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE | \ + VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT) =20 #define VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ALL \ (VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE | \ diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index 31b5af8e9e..0ac128c4bc 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -1967,7 +1967,9 @@ virStoragePoolObjMatch(virStoragePoolObjPtr obj, (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ZFS) && (obj->def->type =3D=3D VIR_STORAGE_POOL_ZFS)) || (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE) && - (obj->def->type =3D=3D VIR_STORAGE_POOL_VSTORAGE)))) + (obj->def->type =3D=3D VIR_STORAGE_POOL_VSTORAGE)) || + (MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT) && + (obj->def->type =3D=3D VIR_STORAGE_POOL_ISCSI_DIRECT)))) return false; } =20 diff --git a/src/libvirt-storage.c b/src/libvirt-storage.c index 3bd61dc986..24e28083ed 100644 --- a/src/libvirt-storage.c +++ b/src/libvirt-storage.c @@ -93,6 +93,7 @@ virStoragePoolGetConnect(virStoragePoolPtr pool) * VIR_CONNECT_LIST_STORAGE_POOLS_MPATH * VIR_CONNECT_LIST_STORAGE_POOLS_RBD * VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG + * VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT * * Returns the number of storage pools found or -1 and sets @pools to * NULL in case of error. On success, the array stored into @pools is diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index c56ab2d90a..510d41b508 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -1205,7 +1205,7 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd ATTRIB= UTE_UNUSED) flags |=3D VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI; break; case VIR_STORAGE_POOL_ISCSI_DIRECT: - flags |=3D VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI; + flags |=3D VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI_DIRECT; break; case VIR_STORAGE_POOL_SCSI: flags |=3D VIR_CONNECT_LIST_STORAGE_POOLS_SCSI; diff --git a/tools/virsh.pod b/tools/virsh.pod index dbcac24292..62ffd43ba9 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -4093,7 +4093,7 @@ I<--uuid> and I<--name>. You may also want to list pools with specified types using I, the pool types must be separated by comma, e.g. --type dir,disk. The valid pool types include 'dir', 'fs', 'netfs', 'logical', 'disk', 'iscsi', 'scsi', -'mpath', 'rbd', 'sheepdog' and 'gluster'. +'mpath', 'rbd', 'sheepdog', 'gluster', 'iscsi-direct'. =20 The I<--details> option instructs virsh to additionally display pool persistence and capacity related information where available. --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list