[libvirt] [PATCH 8/8] qemu: Error out if the shared disk conf conflicts with others when attaching
Eric Blake
eblake at redhat.com
Fri Dec 14 22:13:57 UTC 2012
On 12/13/2012 12:05 PM, Osier Yang wrote:
> Just like for domain starting, this checks if the shared disk's conf
> conflicts with others.
> ---
> src/qemu/qemu_driver.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 7239d71..eb0c921 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -5995,6 +5995,11 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
> goto end;
> }
>
> + if (disk->type == VIR_DOMAIN_DISK_TYPE_BLOCK &&
> + disk->shared &&
> + (qemuCheckSharedDisk(driver->sharedDisks, disk) < 0))
> + goto end;
> +
Looks reasonable. Might be small enough to be worth squashing with one
of your other patches (that is, does it buy us anything to be able to
bisect to a state where starting a domain and hotplugging a disk have
different logic on checking whether there is a conflict, or should we
just have a single patch that introduces all conflict checks to both
places).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121214/e2d059fe/attachment-0001.sig>
More information about the libvir-list
mailing list