From nobody Mon Feb 9 22:18:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612425824; cv=none; d=zohomail.com; s=zohoarc; b=CVdI5TPB3L7hAtxcHX0E0IR8XusZrFwI7m1IoBVTPgBB8KxQ2IwybsUI8JfBXmOJd1V9pAm/AMVFPds0pVPR2fXRpsN7O9JLyS8zpxhbyADs4ZCvemeXc5MY3mDjQQPFxZFx/gjUoCVcke9LVEgkMZ01pYT56KoYxXbcbzXa+GU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612425824; h=Content-Type:Content-Transfer-Encoding:Cc: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=5Qbz3v+yXaY2TZSIqhKtQdng7C1H5WLfIKmrCH5t+9k=; b=XoXdAaxBnn44R0m1bYySvef0dLXL+4iss117KzTKkaQgEGkhvEnelKSSj2FiTaVnb3iCExgClofbCnoeghAU4GZywD2yiu+nlhVxSXTgr/YyxPvoyw+g5bCNU2ZzXQOg/ehixGayVe0ktjM6y1DyfV3jmz7zAPmiUpDJJGkerJI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1612425824485957.8505238084148; Thu, 4 Feb 2021 00:03:44 -0800 (PST) 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-13-AFQqIPvHMcKXLxhauHKBhA-1; Thu, 04 Feb 2021 03:03:40 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 593375B38D; Thu, 4 Feb 2021 08:03:34 +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 33B785D9C0; Thu, 4 Feb 2021 08:03:34 +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 B978257DFF; Thu, 4 Feb 2021 08:03:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11481kwY007805 for ; Thu, 4 Feb 2021 03:01:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8A1C0FED34; Thu, 4 Feb 2021 08:01:46 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 800AC103289 for ; Thu, 4 Feb 2021 08:01:38 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 37AC21019C86 for ; Thu, 4 Feb 2021 08:01:38 +0000 (UTC) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-EQxbx1WlPPKLlWc-AIiBIA-1; Thu, 04 Feb 2021 03:01:35 -0500 Received: by mail-wr1-f52.google.com with SMTP id l12so2383564wry.2 for ; Thu, 04 Feb 2021 00:01:35 -0800 (PST) Received: from rosea.lan (84-112-24-125.cable.dynamic.surfer.at. [84.112.24.125]) by smtp.gmail.com with ESMTPSA id g16sm5047819wmi.30.2021.02.04.00.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 00:01:33 -0800 (PST) X-MC-Unique: AFQqIPvHMcKXLxhauHKBhA-1 X-MC-Unique: EQxbx1WlPPKLlWc-AIiBIA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5Qbz3v+yXaY2TZSIqhKtQdng7C1H5WLfIKmrCH5t+9k=; b=agwMEE9gDyWoxZ5f98GHAjaHbqJxTCE5wzJX0kIcfnkX8dog6JUAPaIFeasZJx4sYu ysK8gLcC3h2JPa9V9hMTaJQSPwOByE9U7BDms0wbbPMLbSrNIllSnlcfkT7ETRRcngOG CDNiWhzYQW1kAd1e9+Rh4ABuJlN+o1y5qgK5BK8YjPjbz8PLd8PUuYutz1E97NjpIg+d yndvvDU5bleNH/GSWTHkr4o4NBymEJjYP6WQHzcw5TNX9hWotUu07ZVPiO0kH6kFjdVi uUPQecsHuROyp9N7V+MHgSOEy6X+/omRTC68vR2/iqUQeu25hhswiybAenNvi/jsF+eU sMrQ== X-Gm-Message-State: AOAM531Y3yn5FQCnPtGIjc44RTXwhU/L5fzQ/S8Mcd9vP9qdo2vKtHsd crnABIw1M498/AhLFA6H6mDkVEKLKFRGiw== X-Google-Smtp-Source: ABdhPJxQxvJU22yxxkMcDc2dndev9FQ7/3gp2A0QaYdFW/sghjfAJhZ9WFvpwGyMjba77t74i8Is4w== X-Received: by 2002:adf:f4c1:: with SMTP id h1mr7858011wrp.102.1612425694364; Thu, 04 Feb 2021 00:01:34 -0800 (PST) From: Rene Peinthor To: libvir-list@redhat.com Subject: [PATCH 1/3] storage: Linstor configuration Date: Thu, 4 Feb 2021 09:01:20 +0100 Message-Id: <20210204080122.141738-2-rene.peinthor@linbit.com> In-Reply-To: <20210204080122.141738-1-rene.peinthor@linbit.com> References: <20210204080122.141738-1-rene.peinthor@linbit.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Rene Peinthor 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.14 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 Content-Type: text/plain; charset="utf-8" This adds Linstor storage defines and documentation for the new storage backend for Linstor. Signed-off-by: Rene Peinthor --- docs/schemas/storagepool.rng | 27 +++++++++++++++++++ include/libvirt/libvirt-storage.h | 1 + src/conf/domain_conf.c | 1 + src/conf/storage_conf.c | 13 ++++++++- src/conf/storage_conf.h | 1 + src/conf/virstorageobj.c | 4 ++- src/storage/storage_driver.c | 1 + src/test/test_driver.c | 1 + .../storagepoolcapsschemadata/poolcaps-fs.xml | 7 +++++ .../poolcaps-full.xml | 7 +++++ tests/storagepoolxml2argvtest.c | 1 + tools/virsh-pool.c | 3 +++ 12 files changed, 65 insertions(+), 2 deletions(-) diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng index bd24b8b8d0..9b163e611d 100644 --- a/docs/schemas/storagepool.rng +++ b/docs/schemas/storagepool.rng @@ -26,6 +26,7 @@ + @@ -224,6 +225,21 @@ =20 + + + linstor + + + + + + + + + + + + @@ -463,6 +479,17 @@ =20 + + + + + + + + + + + diff --git a/include/libvirt/libvirt-storage.h b/include/libvirt/libvirt-st= orage.h index 089e1e0bd1..6876ce6c5a 100644 --- a/include/libvirt/libvirt-storage.h +++ b/include/libvirt/libvirt-storage.h @@ -245,6 +245,7 @@ typedef enum { 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, + VIR_CONNECT_LIST_STORAGE_POOLS_LINSTOR =3D 1 << 20, } virConnectListAllStoragePoolsFlags; =20 int virConnectListAllStoragePools(virConnectPtr conn, diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 12ebdb37f4..7cd697aee4 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -31429,6 +31429,7 @@ virDomainStorageSourceTranslateSourcePool(virStorag= eSourcePtr src, case VIR_STORAGE_POOL_SCSI: case VIR_STORAGE_POOL_ZFS: case VIR_STORAGE_POOL_VSTORAGE: + case VIR_STORAGE_POOL_LINSTOR: if (!(src->path =3D virStorageVolGetPath(vol))) return -1; =20 diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 3f06fcaebf..6bd3ca3b35 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -60,7 +60,7 @@ VIR_ENUM_IMPL(virStoragePool, "logical", "disk", "iscsi", "iscsi-direct", "scsi", "mpath", "rbd", "sheepdog", "gluster", - "zfs", "vstorage", + "zfs", "vstorage", "linstor" ); =20 VIR_ENUM_IMPL(virStoragePoolFormatFileSystem, @@ -304,6 +304,17 @@ static virStoragePoolTypeInfo poolTypeInfo[] =3D { .formatToString =3D virStorageFileFormatTypeToString, }, }, + {.poolType =3D VIR_STORAGE_POOL_LINSTOR, + .poolOptions =3D { + .flags =3D (VIR_STORAGE_POOL_SOURCE_NETWORK | + VIR_STORAGE_POOL_SOURCE_NAME), + }, + .volOptions =3D { + .defaultFormat =3D VIR_STORAGE_FILE_RAW, + .formatFromString =3D virStorageVolumeFormatFromString, + .formatToString =3D virStorageFileFormatTypeToString, + } + }, }; =20 =20 diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index 647eb847bf..1750c41a9f 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -110,6 +110,7 @@ typedef enum { VIR_STORAGE_POOL_GLUSTER, /* Gluster device */ VIR_STORAGE_POOL_ZFS, /* ZFS */ VIR_STORAGE_POOL_VSTORAGE, /* Virtuozzo Storage */ + VIR_STORAGE_POOL_LINSTOR, /* Linstor Storage */ =20 VIR_STORAGE_POOL_LAST, } virStoragePoolType; diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index 9fe8b3f28e..4a2a924eb2 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -1461,13 +1461,15 @@ virStoragePoolObjSourceFindDuplicateCb(const void *= payload, case VIR_STORAGE_POOL_FS: case VIR_STORAGE_POOL_LOGICAL: case VIR_STORAGE_POOL_DISK: + case VIR_STORAGE_POOL_LINSTOR: case VIR_STORAGE_POOL_ZFS: if ((data->def->type =3D=3D VIR_STORAGE_POOL_ISCSI || data->def->type =3D=3D VIR_STORAGE_POOL_ISCSI_DIRECT || data->def->type =3D=3D VIR_STORAGE_POOL_FS || data->def->type =3D=3D VIR_STORAGE_POOL_LOGICAL || data->def->type =3D=3D VIR_STORAGE_POOL_DISK || - data->def->type =3D=3D VIR_STORAGE_POOL_ZFS) && + data->def->type =3D=3D VIR_STORAGE_POOL_ZFS || + data->def->type =3D=3D VIR_STORAGE_POOL_LINSTOR) && virStoragePoolObjSourceMatchTypeDEVICE(obj, data->def)) return 1; break; diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 16bc53aa46..63f860a963 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -1647,6 +1647,7 @@ storageVolLookupByPathCallback(virStoragePoolObjPtr o= bj, case VIR_STORAGE_POOL_RBD: case VIR_STORAGE_POOL_SHEEPDOG: case VIR_STORAGE_POOL_ZFS: + case VIR_STORAGE_POOL_LINSTOR: case VIR_STORAGE_POOL_LAST: stable_path =3D g_strdup(data->path); break; diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 29c4c86b1d..b03ede39d0 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -7103,6 +7103,7 @@ testStorageVolumeTypeForPool(int pooltype) case VIR_STORAGE_POOL_ISCSI: case VIR_STORAGE_POOL_SCSI: case VIR_STORAGE_POOL_ZFS: + case VIR_STORAGE_POOL_LINSTOR: return VIR_STORAGE_VOL_BLOCK; case VIR_STORAGE_POOL_LAST: default: diff --git a/tests/storagepoolcapsschemadata/poolcaps-fs.xml b/tests/storag= epoolcapsschemadata/poolcaps-fs.xml index eee75af746..2ddb18082e 100644 --- a/tests/storagepoolcapsschemadata/poolcaps-fs.xml +++ b/tests/storagepoolcapsschemadata/poolcaps-fs.xml @@ -204,4 +204,11 @@ + + + + + + + diff --git a/tests/storagepoolcapsschemadata/poolcaps-full.xml b/tests/stor= agepoolcapsschemadata/poolcaps-full.xml index 805950a937..cdce2d1ad8 100644 --- a/tests/storagepoolcapsschemadata/poolcaps-full.xml +++ b/tests/storagepoolcapsschemadata/poolcaps-full.xml @@ -204,4 +204,11 @@ + + + + + + + diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtes= t.c index 967d1f21a8..a632b07a00 100644 --- a/tests/storagepoolxml2argvtest.c +++ b/tests/storagepoolxml2argvtest.c @@ -68,6 +68,7 @@ testCompareXMLToArgvFiles(bool shouldFail, case VIR_STORAGE_POOL_GLUSTER: case VIR_STORAGE_POOL_ZFS: case VIR_STORAGE_POOL_VSTORAGE: + case VIR_STORAGE_POOL_LINSTOR: case VIR_STORAGE_POOL_LAST: default: VIR_TEST_DEBUG("pool type '%s' has no xml2argv test", defTypeStr); diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index 7835fa6d75..0e5bec1688 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -1237,6 +1237,9 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd G_GNUC= _UNUSED) case VIR_STORAGE_POOL_VSTORAGE: flags |=3D VIR_CONNECT_LIST_STORAGE_POOLS_VSTORAGE; break; + case VIR_STORAGE_POOL_LINSTOR: + flags |=3D VIR_CONNECT_LIST_STORAGE_POOLS_LINSTOR; + break; case VIR_STORAGE_POOL_LAST: break; } --=20 2.30.0