]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docs: Document the new <slices> sub-element of disk's <source>
authorPeter Krempa <pkrempa@redhat.com>
Wed, 5 Feb 2020 17:00:23 +0000 (18:00 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 14 Feb 2020 15:32:21 +0000 (16:32 +0100)
We are going to add support for specifying offset and size attributes
which will allow controling where the image and where the guest data
itself starts in the source of the disk. This will be represented by
a <slices> element filled with either a <slice type='storage'> for the
offset of the image format data.

Add the XML documentation and RNG schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
docs/formatdomain.html.in
docs/schemas/domaincommon.rng

index d29c20e6ed9965da7477ac81226124d690f1eb1e..f4af65f13ff03e27726f4c064d720ffd0b342b0a 100644 (file)
   &lt;disk type='block' device='lun'&gt;
     &lt;driver name='qemu' type='raw'/&gt;
     &lt;source dev='/dev/sda'&gt;
+      &lt;slices&gt;
+        &lt;slice type='storage' offset='12345' size='123'/&gt;
+      &lt;/slices&gt;
       &lt;reservations managed='no'&gt;
         &lt;source type='unix' path='/path/to/qemu-pr-helper' mode='client'/&gt;
       &lt;/reservations&gt;
             controller.
             <span class="since">Since 6.0.0</span>
           </dd>
+          <dt><code>slices</code></dt>
+          <dd>The <code>slices</code> element using its <code>slice</code>
+            sub-elements allows configuring offset and size of either the
+            location of the image format (<code>slice type='storage'</code>)
+            inside the storage source or the guest data inside the image format
+            container (future expansion).
+
+            The <code>offset</code> and <code>size</code> values are in bytes.
+            <span class="since">Since 6.1.0</span>
+          </dd>
         </dl>
 
         <p>
index 29b6b953573fa24aa4daec44d972b060b857b43b..4be751461df9ed6f65f3d6ef2bbf5a0aeeb3f9ac 100644 (file)
     </optional>
   </define>
 
+  <define name="diskSourceSlice">
+    <attribute name='offset'>
+      <ref name="positiveInteger"/>
+    </attribute>
+    <attribute name='size'>
+      <ref name="positiveInteger"/>
+    </attribute>
+  </define>
+
   <define name="diskSourceCommon">
     <optional>
       <attribute name="index">
         <ref name="positiveInteger"/>
       </attribute>
     </optional>
+    <optional>
+      <element name='slices'>
+        <element name='slice'>
+          <attribute name='type'>
+            <value>storage</value>
+          </attribute>
+          <ref name="diskSourceSlice"/>
+        </element>
+      </element>
+    </optional>
   </define>
 
   <define name="diskSource">