On Thu, Dec 13, 2012 at 06:20:06PM +0100, Guido Günther wrote: > so we can build with older sanlock (like 2.2) > --- > I've applied this to the current Debian builds since we're lagging a bit > regarding sanlock but it might make sense to also support this upstream. > Cheers, > -- Guido > > src/locking/lock_driver_sanlock.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c > index 430e11e..84f81ec 100644 > --- a/src/locking/lock_driver_sanlock.c > +++ b/src/locking/lock_driver_sanlock.c > @@ -338,6 +338,9 @@ retry: > if ((rv = sanlock_add_lockspace(&ls, 0)) < 0) { > if (-rv == EINPROGRESS) { > #ifdef HAVE_SANLOCK_INQ_LOCKSPACE > +# ifndef SANLK_INQ_WAIT > +# define SANLK_INQ_WAIT 0x00000001 > +# endif > /* we have this function which blocks until lockspace change the > * state. It returns 0 if lockspace has been added, -ENOENT if it > * hasn't. XXX should we goto retry? */ I don't think this is the right approach. The code relies on the fact that INQ_WAIT actally works. Just passing this flag to an impl which doesn't support it will not do the right thing. This piece of code is already conditionalized on HAVE_SANLOCK_INQ_LOCKSPACE to fallback to alternative busy-wait loop impl. We need to make sure that the Debian falls back to the alternative impl. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list