storage: treat 'aio' like 'raw' at parse time

We have historically allowed 'aio' as a synonym for 'raw' for
back-compat to xen, but since a future patch will move to using
an enum value, we have to pick one to be our preferred output
name.  This is a slight change in the output XML, but the sexpr
and xm outputs should still be identical, and the input XML can
still use either form.

* src/conf/domain_conf.c (virDomainDiskDefForeachPath): Move aio
back-compat...
(virDomainDiskDefParseXML): ...to parse time.
* src/xenxs/xen_sxpr.c (xenParseSxprDisks, xenFormatSxprDisk): ...and
to output time.
* src/xenxs/xen_xm.c (xenParseXM, xenFormatXMDisk): Likewise.
* tests/sexpr2xmldata/sexpr2xml-*.xml: Update tests.
This commit is contained in:
Eric Blake
2012-09-28 17:48:58 -06:00
parent f772b3d91f
commit 41e0edaf84
7 changed files with 30 additions and 9 deletions

View File

@@ -17,7 +17,7 @@
<on_crash>restart</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='tap' type='aio'/>
<driver name='tap' type='raw'/>
<source file='/xen/rhel5.img'/>
<target dev='xvda' bus='xen'/>
</disk>

View File

@@ -14,7 +14,7 @@
<on_crash>restart</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='tap' type='aio'/>
<driver name='tap' type='raw'/>
<source file='/var/lib/xen/images/rhel5pv.img'/>
<target dev='xvda' bus='xen'/>
<shareable/>

View File

@@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='tap' type='aio'/>
<driver name='tap' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>

View File

@@ -16,7 +16,7 @@
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='tap2' type='aio'/>
<driver name='tap2' type='raw'/>
<source file='/root/some.img'/>
<target dev='xvda' bus='xen'/>
</disk>