From nobody Thu May 2 20:23:22 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 1524489320462165.60572683264854; Mon, 23 Apr 2018 06:15:20 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 79BE731500AB; Mon, 23 Apr 2018 13:15:18 +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 E1A135FC26; Mon, 23 Apr 2018 13:15:12 +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 3EC0A62D15; Mon, 23 Apr 2018 13:15:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3NDEuCo022057 for ; Mon, 23 Apr 2018 09:14:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4D60E215CDCC; Mon, 23 Apr 2018 13:14:56 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BFC5215CDC8; Mon, 23 Apr 2018 13:14:55 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 23 Apr 2018 15:14:36 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH v5 01/11] 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 23 Apr 2018 13:15:19 +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 | 23 +++- 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, 314 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 ada0df227f..6ed2fd349d 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2565,7 +2565,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> @@ -2928,6 +2931,24 @@ Storage Encryption page for more information. +
reservations
+
Since libvirt 4.3.0, the + reservations can be a sub-element of the + source element for storage sources (QEMU driver o= nly). + If present (and enabled) it enables persistent reservations fo= r 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 a helper process. When the PR is unmanaged, then hype= rvisor + acts as a client and path to server socket 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 role 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