[libvirt] Re-4: [Patch] Libvirt - Fix locking for readonly devices

Eric Blake eblake at redhat.com
Mon May 14 22:46:45 UTC 2012


On 05/14/2012 03:53 AM, David Weber wrote:
>>
>> Thanks, your patch looks good but needs two further small additions
>> to the libvirt_sanlock.aug and test_libvirt_sanlock.aug files to
>> take account of the new config parameter.
> 
> Oops, Updated patch attached (tested with augparse)
> 
> David
> 
> 
> ----------------------------------------
> 
> commit 33678a8b2d294bebf327106d586d41c9b157174f
> Author: David Weber <wb at munzinger.de>
> Date:   Mon May 14 09:43:27 2012 +0200
> 
>     Add ignore param for readonly and shared disk in sanlock

ACK and pushed, after fixing up whitespace nits ('make syntax-check'
would have caught the trailing whitespace, but not the other one), and
adding you to AUTHORS (let me know if you prefer an alternate spelling).


> +    

Trailing whitespace.

> +    if (((flags & VIR_LOCK_MANAGER_RESOURCE_READONLY) ||
> +        (flags &VIR_LOCK_MANAGER_RESOURCE_SHARED)) &&

Space on both sides of binary operators.  Furthermore, you can simplify
this to: (flags & (VIR_LOCK_MANAGER_RESOURCE_READONLY |
VIR_LOCK_MANAGER_RESOURCE_SHARED)).

> +        (driver->ignoreReadonlyShared)) {

Spurious parenthesis.

> +
> +#
> +# Ignore readonly and shared disks as they aren't supportet yet

s/supportet/supported/

Is it sanlock, or libvirt, or a combination of both that don't yet
support shared resource locks?  I modified this as follows (and hope
that it was good enough, since I pushed):

# Enable this flag to have sanlock ignore readonly and shared disks.
# If disabled, then this rejects attempts to share resources until
# sanlock gains support for shared locks.
#
#ignore_readonly_and_shared_disks = 1

-- 
Eric Blake   eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120514/f106ec45/attachment-0001.sig>


More information about the libvir-list mailing list