[libvirt] [PATCH] Fix disk device ordering

Cole Robinson crobinso at redhat.com
Fri Aug 22 03:21:15 UTC 2008


When parsing the domain xml, disks are supposed to be
rearranged in an alphabetic order based on bus type
and target. The reordering code had a flaw though, in
that it would always put the first disk it encountered
at the head of the list, and had no way of putting
new entries in front of it.

The attached patch reworks the code to compare the new
disk against the current disk entry (rather than the
next entry like the existing code). Seems to pass all
my tests.

Thanks,
Cole
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libvirt-disk-ordering-fix-patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080821/58840dd1/attachment-0001.ksh>


More information about the libvir-list mailing list