render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
d76c62
From 0f126297ca984aa2ef145e2a703fff3dc31c53db Mon Sep 17 00:00:00 2001
d76c62
Message-Id: <0f126297ca984aa2ef145e2a703fff3dc31c53db@dist-git>
d76c62
From: Peter Krempa <pkrempa@redhat.com>
d76c62
Date: Wed, 19 Feb 2020 15:10:19 +0100
d76c62
Subject: [PATCH] docs: Document the new <slices> sub-element of disk's
d76c62
 <source>
d76c62
MIME-Version: 1.0
d76c62
Content-Type: text/plain; charset=UTF-8
d76c62
Content-Transfer-Encoding: 8bit
d76c62
d76c62
We are going to add support for specifying offset and size attributes
d76c62
which will allow controling where the image and where the guest data
d76c62
itself starts in the source of the disk. This will be represented by
d76c62
a <slices> element filled with either a <slice type='storage'> for the
d76c62
offset of the image format data.
d76c62
d76c62
Add the XML documentation and RNG schema.
d76c62
d76c62
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
d76c62
Reviewed-by: Ján Tomko <jtomko@redhat.com>
d76c62
(cherry picked from commit 44f0f76890c6b53a893ffc370836794d74317c34)
d76c62
d76c62
https://bugzilla.redhat.com/show_bug.cgi?id=1791788
d76c62
Message-Id: <9f5488f2e0e5b6d7df386fa428f7779346cbcff4.1582120424.git.pkrempa@redhat.com>
d76c62
Reviewed-by: Ján Tomko <jtomko@redhat.com>
d76c62
---
d76c62
 docs/formatdomain.html.in     | 13 +++++++++++++
d76c62
 docs/schemas/domaincommon.rng | 19 +++++++++++++++++++
d76c62
 2 files changed, 32 insertions(+)
d76c62
d76c62
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
d76c62
index ec48ed77a5..5dbb8b59cf 100644
d76c62
--- a/docs/formatdomain.html.in
d76c62
+++ b/docs/formatdomain.html.in
d76c62
@@ -2878,6 +2878,9 @@
d76c62
   <disk type='block' device='lun'>
d76c62
     <driver name='qemu' type='raw'/>
d76c62
     <source dev='/dev/sda'>
d76c62
+      <slices>
d76c62
+        <slice type='storage' offset='12345' size='123'/>
d76c62
+      </slices>
d76c62
       <reservations managed='no'>
d76c62
         <source type='unix' path='/path/to/qemu-pr-helper' mode='client'/>
d76c62
       </reservations>
d76c62
@@ -3360,6 +3363,16 @@
d76c62
             controller.
d76c62
             Since 6.0.0
d76c62
           
d76c62
+          
slices
d76c62
+          
The slices element using its slice
d76c62
+            sub-elements allows configuring offset and size of either the
d76c62
+            location of the image format (slice type='storage')
d76c62
+            inside the storage source or the guest data inside the image format
d76c62
+            container (future expansion).
d76c62
+
d76c62
+            The offset and size values are in bytes.
d76c62
+            Since 6.1.0
d76c62
+          
d76c62
         
d76c62
 
d76c62
         

d76c62
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
d76c62
index 19476a2735..38aef19e89 100644
d76c62
--- a/docs/schemas/domaincommon.rng
d76c62
+++ b/docs/schemas/domaincommon.rng
d76c62
@@ -1596,12 +1596,31 @@
d76c62
     </optional>
d76c62
   </define>
d76c62
 
d76c62
+  <define name="diskSourceSlice">
d76c62
+    <attribute name='offset'>
d76c62
+      <ref name="positiveInteger"/>
d76c62
+    </attribute>
d76c62
+    <attribute name='size'>
d76c62
+      <ref name="positiveInteger"/>
d76c62
+    </attribute>
d76c62
+  </define>
d76c62
+
d76c62
   <define name="diskSourceCommon">
d76c62
     <optional>
d76c62
       <attribute name="index">
d76c62
         <ref name="positiveInteger"/>
d76c62
       </attribute>
d76c62
     </optional>
d76c62
+    <optional>
d76c62
+      <element name='slices'>
d76c62
+        <element name='slice'>
d76c62
+          <attribute name='type'>
d76c62
+            <value>storage</value>
d76c62
+          </attribute>
d76c62
+          <ref name="diskSourceSlice"/>
d76c62
+        </element>
d76c62
+      </element>
d76c62
+    </optional>
d76c62
   </define>
d76c62
 
d76c62
   <define name="diskSource">
d76c62
-- 
d76c62
2.25.0
d76c62