[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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 linux vnet ibm com>
>> Signed-off-by: Zhi Yong Wu <wuzhy 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 redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]