Re: [PATCH] init cont->idx correctly

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

 



On Mon, Jan 31, 2011 at 02:15:41PM +0800, Wen Congyang wrote:
> Steps to reproduce this bug:
> 1. # virsh attach-disk --target sdb ...
> 2. # virsh attach-disk --target sdh ... 
>    error: Failed to attach disk
>    error: operation failed: target scsi:0 already exists
> 
> sdh uses scsi:1, rather than scsi:0.
> 
> Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx>
> 
> ---
>  src/qemu/qemu_hotplug.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
> index c334f52..670e7d3 100644
> --- a/src/qemu/qemu_hotplug.c
> +++ b/src/qemu/qemu_hotplug.c
> @@ -321,7 +321,7 @@ qemuDomainFindOrCreateSCSIDiskController(struct qemud_driver *driver,
>          return NULL;
>      }
>      cont->type = VIR_DOMAIN_CONTROLLER_TYPE_SCSI;
> -    cont->idx = 0;
> +    cont->idx = controller;
>      cont->model = -1;
>  
>      VIR_INFO0("No SCSI controller present, hotplugging one");

  Okay, based on the earlier lookup code in that function that looks
like the obvious fix,

  ACK, and pushed,

   thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]