[libvirt] [PATCH 0/2] Disallow the usage of the same target dev value
John Ferlan
jferlan at redhat.com
Tue Mar 3 03:45:05 UTC 2015
On 02/26/2015 04:59 PM, John Ferlan wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1142631
>
> Patch 1 was found when adjusting the bz to get the disk by the pool source
> instead of directly by file attribute. When using domblklist, the source
> wasn't displayed. Followed the model of the iscsi '@name' and added '@volume'
> (eg, <source pool='default' volume='test-1g.img'/>)
>
> Patch 2 started as a simple (hah!) double loop looking for duplicate dst
> strings. I chose a separate API called before qemuCheckDiskConfig since
> it's more of a "common" check that could be used by other drivers as opposed
> to the perhaps more specific single disk checks made. Besides I didn't want
> a ndisk factorial checking algorithm each time a disk was checked for something
> that could be checked once.
>
> With the code in place, running make check tripped over a number of existing
> tests that duplicated that '<target dev=...' value, so I fixed those. Of
> interest for a few was that the test would duplicate the supposedly unique
> alias id - those are cleaned up as well as a byproduct of the changes.
>
> John Ferlan (2):
> virsh: Adjust domblklist to understand disk volume syntax
> disk: Disallow duplicated target 'dev' values
>
> src/conf/domain_conf.c | 29 ++++++++++++++++++++++
> src/conf/domain_conf.h | 1 +
> src/libvirt_private.syms | 1 +
> src/qemu/qemu_command.c | 3 +++
> .../qemuxml2argv-disk-scsi-disk-split.xml | 2 +-
> ...qemuxml2argv-disk-scsi-lun-passthrough-sgio.xml | 2 +-
> .../qemuxml2argv-disk-scsi-lun-passthrough.xml | 2 +-
> .../qemuxml2argv-disk-source-pool-mode.xml | 2 +-
> .../qemuxml2argv-disk-source-pool.xml | 2 +-
> .../qemuxml2argv-pci-bridge-many-disks.args | 4 +--
> .../qemuxml2argv-pci-bridge-many-disks.xml | 2 +-
> tests/qemuxml2argvdata/qemuxml2argv-pci-many.args | 8 +++---
> tests/qemuxml2argvdata/qemuxml2argv-pci-many.xml | 4 +--
> .../qemuxml2xmlout-disk-source-pool.xml | 2 +-
> .../qemuxml2xmlout-pci-bridge-many-disks.xml | 2 +-
> tools/virsh-domain-monitor.c | 3 ++-
> 16 files changed, 52 insertions(+), 17 deletions(-)
>
Made the adjustments suggested and pushed - thanks for the review.
John
More information about the libvir-list
mailing list