[libvirt] [PATCH] Add parameter to wait for lock in file locking APIs

Eric Blake eblake at redhat.com
Mon Mar 17 16:19:42 UTC 2014


On 03/17/2014 08:23 AM, Daniel P. Berrange wrote:
> On Mon, Mar 17, 2014 at 07:47:36PM +0530, Nehal J Wani wrote:
>> Our current pidfile acquire APis (virPidFileAcquire) simply return -1 upon
>> failure to acquire a lock. This patch adds a parameter 'bool waitForLock'
>> which instructs the APIs if we want to make it block and wait for the lock
>> or not.
>>
>> ---
>>  Based on Daniel's comments on:
>>  https://www.redhat.com/archives/libvir-list/2014-March/msg00841.html
>>
>>  daemon/libvirtd.c         |    2 +-
>>  src/locking/lock_daemon.c |    4 ++--
>>  src/util/virfile.c        |   14 +++++++++-----
>>  src/util/virfile.h        |    2 +-
>>  src/util/virlockspace.c   |    6 +++---
>>  src/util/virpidfile.c     |    6 ++++--
>>  src/util/virpidfile.h     |    2 ++
>>  7 files changed, 22 insertions(+), 14 deletions(-)
> 
> ACK

Pushed.

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


More information about the libvir-list mailing list