[libvirt] [PATCH 6/8] Docs: Add description and validation for blkdeviotune

Eric Blake eblake at redhat.com
Wed Nov 23 22:00:54 UTC 2011


On 11/22/2011 10:28 PM, Eric Blake wrote:
> On 11/15/2011 02:02 AM, Lei Li wrote:
>> Signed-off-by: Lei Li <lilei at linux.vnet.ibm.com>
>> Signed-off-by: Zhi Yong Wu <wuzhy at linux.vnet.ibm.com>
>> ---
>>  docs/formatdomain.html.in     |   31 +++++++++++++++++++++++++++++++
>>  docs/schemas/domaincommon.rng |   24 ++++++++++++++++++++++++
>>  2 files changed, 55 insertions(+), 0 deletions(-)
> 
> I plan to squash this in with 4/8, and apply it prior to 3/8, although
> I'll review it independently since you submitted it alone.  I find it
> slightly easier to read domain_conf.c parser/printer changes if you have
> .rng changes to compare them to (both now during series review, and
> later in git researching to see when a feature was added).
> 
> 
> Here's what I'm squashing in, before I merge this with 4/8 (hmm, I
> practically rewrote this entire patch):

I'm also adding this; since my testing found that the <interleave> was
at the wrong level if we intend to allow <address> to come either before
or after <iotune>, nor did I allow write_{bytes,iops>_sec to come before
read_{bytes,iops>_sec.

diff --git i/docs/schemas/domaincommon.rng w/docs/schemas/domaincommon.rng
index 7adf9a8..bb6d94d 100644
--- i/docs/schemas/domaincommon.rng
+++ w/docs/schemas/domaincommon.rng
@@ -599,45 +599,47 @@
     </element>
   </define>
   <define name="diskspec">
-    <optional>
-      <ref name="driver"/>
-    </optional>
-    <optional>
-      <ref name="diskAuth"/>
-    </optional>
-    <ref name="target"/>
-    <optional>
-      <ref name="deviceBoot"/>
-    </optional>
-    <optional>
-      <element name="readonly">
-        <empty/>
-      </element>
-    </optional>
-    <optional>
-      <element name="shareable">
-        <empty/>
-      </element>
-    </optional>
-    <optional>
-      <element name="transient">
-        <empty/>
-      </element>
-    </optional>
-    <optional>
-      <element name="serial">
-        <ref name="diskSerial"/>
-      </element>
-    </optional>
-    <optional>
-      <ref name="encryption"/>
-    </optional>
-    <optional>
-      <ref name="address"/>
-    </optional>
-    <optional>
-      <ref name="diskIoTune"/>
-    </optional>
+    <interleave>
+      <optional>
+        <ref name="driver"/>
+      </optional>
+      <optional>
+        <ref name="diskAuth"/>
+      </optional>
+      <ref name="target"/>
+      <optional>
+        <ref name="deviceBoot"/>
+      </optional>
+      <optional>
+        <element name="readonly">
+          <empty/>
+        </element>
+      </optional>
+      <optional>
+        <element name="shareable">
+          <empty/>
+        </element>
+      </optional>
+      <optional>
+        <element name="transient">
+          <empty/>
+        </element>
+      </optional>
+      <optional>
+        <element name="serial">
+          <ref name="diskSerial"/>
+        </element>
+      </optional>
+      <optional>
+        <ref name="encryption"/>
+      </optional>
+      <optional>
+        <ref name="diskIoTune"/>
+      </optional>
+      <optional>
+        <ref name="address"/>
+      </optional>
+    </interleave>
   </define>
   <define name="snapshot">
     <attribute name="snapshot">
@@ -788,11 +790,7 @@
             <ref name="diskspec"/>
           </interleave>
         </group>
-        <group>
-          <interleave>
-            <ref name="diskspec"/>
-          </interleave>
-        </group>
+        <ref name="diskspec"/>
       </choice>
     </element>
   </define>
@@ -2611,16 +2609,18 @@
             <data type="unsignedLong"/>
           </element>
           <group>
-            <optional>
-              <element name="read_bytes_sec">
-                <data type="unsignedLong"/>
-              </element>
-            </optional>
-            <optional>
-              <element name="write_bytes_sec">
-                <data type="unsignedLong"/>
-              </element>
-            </optional>
+            <interleave>
+              <optional>
+                <element name="read_bytes_sec">
+                  <data type="unsignedLong"/>
+                </element>
+              </optional>
+              <optional>
+                <element name="write_bytes_sec">
+                  <data type="unsignedLong"/>
+                </element>
+              </optional>
+            </interleave>
           </group>
         </choice>
         <choice>
@@ -2628,16 +2628,18 @@
             <data type="unsignedLong"/>
           </element>
           <group>
-            <optional>
-              <element name="read_iops_sec">
-                <data type="unsignedLong"/>
-              </element>
-            </optional>
-            <optional>
-              <element name="write_iops_sec">
-                <data type="unsignedLong"/>
-              </element>
-            </optional>
+            <interleave>
+              <optional>
+                <element name="read_iops_sec">
+                  <data type="unsignedLong"/>
+                </element>
+              </optional>
+              <optional>
+                <element name="write_iops_sec">
+                  <data type="unsignedLong"/>
+                </element>
+              </optional>
+            </interleave>
           </group>
         </choice>
       </interleave>


-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111123/94d8c97a/attachment-0001.sig>


More information about the libvir-list mailing list