Re: [libvirt] RFC [1/3]: The internal lock manager API

2010-09-16 Thread Daniel Veillard
Looks fine on principles, but there is some polishing to be provided, I especially think that we need to carefully examine all failure scenarios and document the expected behaviour as part of the API. After all it's an API to improve garantee of correct execution so we need to be fairly precise t

Re: [libvirt] RFC [1/3]: The internal lock manager API

2010-09-13 Thread Daniel P. Berrange
On Fri, Sep 10, 2010 at 01:50:56PM -0600, Eric Blake wrote: > On 09/10/2010 10:00 AM, Daniel P. Berrange wrote: > >/** > > * virLockManagerSetParameter: > > * @manager: the lock manager context > > * @key: the parameter name > > * @value: the parameter value > > * > > * Set a configuration pa

Re: [libvirt] RFC [1/3]: The internal lock manager API

2010-09-13 Thread Daniel P. Berrange
On Sun, Sep 12, 2010 at 02:22:04PM +0200, Saggi Mizrahi wrote: > On Fri, 2010-09-10 at 17:00 +0100, Daniel P. Berrange wrote: > > > > enum { > > VIR_LOCK_MANAGER_NEW_MIGRATE = (1 << 0), > > VIR_LOCK_MANAGER_NEW_ATTACH = (1 << 1), > > } virLockManagerNewFlags; > > > > enum { > > VIR_L

Re: [libvirt] RFC [1/3]: The internal lock manager API

2010-09-12 Thread Saggi Mizrahi
On Fri, 2010-09-10 at 17:00 +0100, Daniel P. Berrange wrote: > /** > * virLockManager: > * > * A lock manager is a process that will supervise another > * process. It will obtain & hold locks/leases for resources > * the supervised process uses > */ > > typedef struct virLockManager virLockM

Re: [libvirt] RFC [1/3]: The internal lock manager API

2010-09-10 Thread Eric Blake
On 09/10/2010 10:00 AM, Daniel P. Berrange wrote: /** * virLockManagerSetParameter: * @manager: the lock manager context * @key: the parameter name * @value: the parameter value * * Set a configuration parameter for the managed process. * A process of VIR_LOCK_MANAGER_START_DOMAIN w

Re: [libvirt] RFC [1/3]: The internal lock manager API

2010-09-10 Thread Daniel P. Berrange
/** * virLockManager: * * A lock manager is a process that will supervise another * process. It will obtain & hold locks/leases for resources * the supervised process uses */ typedef struct virLockManager virLockManager; typedef virLockManager *virLockManagerPtr; typedef enum { VIR_LOC