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

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