Re: [libvirt] [PATCH] qemu: Add the new disk src into shared disk table when updating disk

2013-03-20 Thread Osier Yang

On 2013年03月21日 06:16, Eric Blake wrote:

On 03/18/2013 07:52 AM, Osier Yang wrote:

We should record the new disk src in the shared disk table for
updating disk (CD-ROM or Floppy) API. Fortunately, we only allow
to update the disk source now, otherwise we might also want to
set the unpriv_sgio setting.
---
  src/qemu/qemu_driver.c |4 
  1 files changed, 4 insertions(+), 0 deletions(-)


ACK.



Thanks, pushed.

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

Re: [libvirt] [PATCH] qemu: Add the new disk src into shared disk table when updating disk

2013-03-20 Thread Eric Blake
On 03/18/2013 07:52 AM, Osier Yang wrote:
> We should record the new disk src in the shared disk table for
> updating disk (CD-ROM or Floppy) API. Fortunately, we only allow
> to update the disk source now, otherwise we might also want to
> set the unpriv_sgio setting.
> ---
>  src/qemu/qemu_driver.c |4 
>  1 files changed, 4 insertions(+), 0 deletions(-)

ACK.

> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 9cd9e44..d0d2b9e 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -6067,6 +6067,10 @@ qemuDomainChangeDiskMediaLive(virDomainObjPtr vm,
>  }
>  dev->data.disk = tmp;
>  
> +/* Add the new disk src into shared disk hash table */
> +if (qemuAddSharedDisk(driver, dev->data.disk, vm->def->name) < 0)
> +goto end;
> +
>  ret = qemuDomainChangeEjectableMedia(driver, vm, disk, orig_disk, 
> force);
>  if (ret == 0) {
>  dev->data.disk = NULL;
> 

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] qemu: Add the new disk src into shared disk table when updating disk

2013-03-18 Thread Osier Yang
We should record the new disk src in the shared disk table for
updating disk (CD-ROM or Floppy) API. Fortunately, we only allow
to update the disk source now, otherwise we might also want to
set the unpriv_sgio setting.
---
 src/qemu/qemu_driver.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 9cd9e44..d0d2b9e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6067,6 +6067,10 @@ qemuDomainChangeDiskMediaLive(virDomainObjPtr vm,
 }
 dev->data.disk = tmp;
 
+/* Add the new disk src into shared disk hash table */
+if (qemuAddSharedDisk(driver, dev->data.disk, vm->def->name) < 0)
+goto end;
+
 ret = qemuDomainChangeEjectableMedia(driver, vm, disk, orig_disk, 
force);
 if (ret == 0) {
 dev->data.disk = NULL;
-- 
1.7.7.6

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