[libvirt] [PATCH] Fix detection of disk in IO events
Daniel Veillard
veillard at redhat.com
Wed Apr 28 14:24:42 UTC 2010
On Wed, Apr 28, 2010 at 03:16:21PM +0100, Daniel P. Berrange wrote:
> When using -device syntax, the IO event will have a different
> prefix, 'drive-' that needs to be skipped over before matching
> against the libvirt disk alias
>
> * src/qemu/qemu_driver.c: Skip QEMU_DRIVE_HOST_PREFIX in IO event
> ---
> src/qemu/qemu_driver.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 3e0a38a..9434e00 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -763,6 +763,9 @@ findDomainDiskByAlias(virDomainObjPtr vm,
> {
> int i;
>
> + if (STRPREFIX(alias, QEMU_DRIVE_HOST_PREFIX))
> + alias += strlen(QEMU_DRIVE_HOST_PREFIX);
> +
> for (i = 0; i < vm->def->ndisks; i++) {
> virDomainDiskDefPtr disk;
>
ACK,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list