]> git.ipfire.org Git - thirdparty/libvirt.git/commit
sanlock: Re-add lockspace unconditionally
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 14 Dec 2012 11:17:55 +0000 (12:17 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 14 Dec 2012 14:01:03 +0000 (15:01 +0100)
commit11cfa28850714bc03629456569c3427685392e6b
treec2bd95fd711fe28909bb1fdd71f2aea1eeff1633
parent8d59a025bbc51f685042b4d48fcde7e6d94d3197
sanlock: Re-add lockspace unconditionally

Currently, if sanlock is already registering a lockspace other
libvirtd instances (from other hosts) obtain -EINPROGRESS. On
sufficiently new sanlock, sanlock_inq_lockspace() is called,
which suspend execution until lockspace state is changed. With
current libvirt implementation, we fail to retry adding the
lockspace again but continue in error path. Therefore we produce
meaningless error message:

virLockManagerSanlockSetupLockspace:363 : Unable to add lockspace
/var/lib/libvirt/sanlock/__LIBVIRT__DISKS__: Success
qemudLoadDriverConfig:558 : Failed to load lock manager sanlock

We should try to re-add the lockspace after its state change to
be sure it was added successfully. In fact, with sufficiently new
sanlock we can just avoid dummy usleep() which is used if there's
no inquire API.
src/locking/lock_driver_sanlock.c