From nobody Fri May 3 05:09:36 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523372425587503.50580814832074; Tue, 10 Apr 2018 08:00:25 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3825DC0F56F5; Tue, 10 Apr 2018 15:00:24 +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 074F389C39; Tue, 10 Apr 2018 15:00:24 +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 F0CA84CAAB; Tue, 10 Apr 2018 15:00:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3AEwJPK013368 for ; Tue, 10 Apr 2018 10:58:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 58FA92024CA4; Tue, 10 Apr 2018 14:58:19 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id D87DD2024CA7 for ; Tue, 10 Apr 2018 14:58:18 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 10 Apr 2018 16:58:03 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v4 01/14] virstoragefile: Introduce virStoragePRDef 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 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 10 Apr 2018 15:00:24 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This is a definition that holds information on SCSI persistent reservation settings. The XML part looks like this: If @managed is set to 'yes' then the is not parsed. This design was agreed on here: https://www.redhat.com/archives/libvir-list/2017-November/msg01005.html Signed-off-by: Michal Privoznik Reviewed-by: John Ferlan --- docs/formatdomain.html.in | 25 +++- docs/schemas/domaincommon.rng | 34 +----- docs/schemas/storagecommon.rng | 50 ++++++++ src/conf/domain_conf.c | 38 ++++++ src/libvirt_private.syms | 3 + src/util/virstoragefile.c | 131 +++++++++++++++++= ++++ src/util/virstoragefile.h | 14 +++ .../disk-virtio-scsi-reservations.xml | 49 ++++++++ .../disk-virtio-scsi-reservations.xml | 1 + tests/qemuxml2xmltest.c | 2 + 10 files changed, 316 insertions(+), 31 deletions(-) create mode 100644 tests/qemuxml2argvdata/disk-virtio-scsi-reservations.xml create mode 120000 tests/qemuxml2xmloutdata/disk-virtio-scsi-reservations.= xml diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 5e99884dc5..c20e98b4ef 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2563,7 +2563,10 @@ </disk> <disk type=3D'block' device=3D'lun'> <driver name=3D'qemu' type=3D'raw'/> - <source dev=3D'/dev/sda'/> + <source dev=3D'/dev/sda'> + <reservations enabled=3D'yes' managed=3D'no'> + <source type=3D'unix' path=3D'/path/to/qemu-pr-helper' mode=3D'= client'/> + </reservations> <target dev=3D'sda' bus=3D'scsi'/> <address type=3D'drive' controller=3D'0' bus=3D'0' target=3D'3' uni= t=3D'0'/> </disk> @@ -2926,6 +2929,26 @@ Storage Encryption page for more information. +
reservations
+
Since libvirt 4.1.0, the + reservations can be a sub-element of the + source element for storage sources (QEMU driver o= nly). + If present (and enabled) it enabled persistent reservations for + SCSI based disks. The element has one mandatory attribute + enabled with accepted values yes and + no. If the feature is enabled, then there's anoth= er + mandatory attribute managed (accepted values are = the + same as for enabled) that enables or disables lib= virt + spawning any helper process (should one be needed). However, if + libvirt is not enabled spawning helper process (i.e. hypervisor + should just use one which is already running), path to its soc= ket + must be provided in child element source, which + currently accepts only the following attributes: type + with one value unix, path with path = the + socket, and finally mode which accepts either + server or client and specifies the r= ole + of hypervisor. +
=20

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 4cab55f05d..93084887fb 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1530,6 +1530,9 @@ + + + @@ -2434,18 +2437,6 @@ - - - - - - - - - - - - =20