[libvirt] [PATCH] Fix release of resources with lockd plugin

Eric Blake eblake at redhat.com
Fri May 3 12:34:38 UTC 2013


On 05/03/2013 06:15 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> The lockd plugin for the lock manager was not correctly
> handling the release of resource locks. This meant that
> during migration, or when pausing a VM, the locks would
> not get released. This in turn made it impossible to
> resume the domain, or finish migration
> ---
>  src/locking/lock_driver_lockd.c | 38 ++++++++++++++++++++++++++------------
>  1 file changed, 26 insertions(+), 12 deletions(-)
> 
> diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c

> -
> -    if (virNetClientProgramCall(program,
> -                                client,
> -                                counter++,
> -                                VIR_LOCK_SPACE_PROTOCOL_PROC_RELEASE_RESOURCE,
> -                                0, NULL, NULL, NULL,
> -                                (xdrproc_t)xdr_virLockSpaceProtocolReleaseResourceArgs, &args,
> -                                (xdrproc_t)xdr_void, NULL) < 0)

So the old code released the first resource,

> -        goto cleanup;
> +    for (i = 0 ; i < priv->nresources ; i++) {

but the new code loops over all resources.  Yeah, I could see how that
causes a problem if more than one resource is held.

ACK.

-- 
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: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130503/6ce9da2b/attachment-0001.sig>


More information about the libvir-list mailing list