qemu: Support copy on read for disk

The new introduced optional attribute "copy_on_read</code> controls
whether to copy read backing file into the image file. The value can
be either "on" or "off". Copy-on-read avoids accessing the same backing
file sectors repeatedly and is useful when the backing file is over a
slow network. By default copy-on-read is off.
This commit is contained in:
Osier Yang
2012-01-12 17:31:14 +08:00
parent b54de0830a
commit 5edfcaae6f
12 changed files with 137 additions and 2 deletions

View File

@@ -958,6 +958,9 @@
<optional>
<ref name="event_idx"/>
</optional>
<optional>
<ref name="copy_on_read"/>
</optional>
<empty/>
</element>
</define>
@@ -1025,6 +1028,14 @@
</choice>
</attribute>
</define>
<define name="copy_on_read">
<attribute name='copy_on_read'>
<choice>
<value>on</value>
<value>off</value>
</choice>
</attribute>
</define>
<define name="controller">
<element name="controller">
<choice>