mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35:25 +00:00
m4: virt-sanlock: drop check for SANLK_INQ_WAIT
SANLK_INQ_WAIT was introduced in sanlock 2.4 which is available in all supported OSes. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
95037c48ef
commit
c495169478
@ -25,15 +25,6 @@ AC_DEFUN([LIBVIRT_CHECK_SANLOCK],[
|
|||||||
LIBVIRT_CHECK_PKG([SANLOCK], [libsanlock_client], [3.2.4])
|
LIBVIRT_CHECK_PKG([SANLOCK], [libsanlock_client], [3.2.4])
|
||||||
|
|
||||||
if test "x$with_sanlock" = "xyes" ; then
|
if test "x$with_sanlock" = "xyes" ; then
|
||||||
AC_CHECK_DECLS([SANLK_INQ_WAIT], [sanlock_inq_wait=1], [sanlock_inq_wait=0], [[
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <sanlock_admin.h>
|
|
||||||
]])
|
|
||||||
if test sanlock_inq_wait = 1; then
|
|
||||||
AC_DEFINE_UNQUOTED([HAVE_SANLK_INQ_WAIT], 1,
|
|
||||||
[whether sanlock supports SANLK_INQ_WAIT])
|
|
||||||
fi
|
|
||||||
|
|
||||||
old_cppflags="$CPPFLAGS"
|
old_cppflags="$CPPFLAGS"
|
||||||
old_libs="$LIBS"
|
old_libs="$LIBS"
|
||||||
CPPFLAGS="$CPPFLAGS $SANLOCK_CFLAGS"
|
CPPFLAGS="$CPPFLAGS $SANLOCK_CFLAGS"
|
||||||
|
@ -361,18 +361,12 @@ virLockManagerSanlockSetupLockspace(virLockManagerSanlockDriverPtr driver)
|
|||||||
#endif
|
#endif
|
||||||
if (rv < 0) {
|
if (rv < 0) {
|
||||||
if (-rv == EINPROGRESS && --retries) {
|
if (-rv == EINPROGRESS && --retries) {
|
||||||
#ifdef HAVE_SANLK_INQ_WAIT
|
|
||||||
/* we have this function which blocks until lockspace change the
|
/* we have this function which blocks until lockspace change the
|
||||||
* state. It returns 0 if lockspace has been added, -ENOENT if it
|
* state. It returns 0 if lockspace has been added, -ENOENT if it
|
||||||
* hasn't. */
|
* hasn't. */
|
||||||
VIR_DEBUG("Inquiring lockspace");
|
VIR_DEBUG("Inquiring lockspace");
|
||||||
if (sanlock_inq_lockspace(&ls, SANLK_INQ_WAIT) < 0)
|
if (sanlock_inq_lockspace(&ls, SANLK_INQ_WAIT) < 0)
|
||||||
VIR_DEBUG("Unable to inquire lockspace");
|
VIR_DEBUG("Unable to inquire lockspace");
|
||||||
#else
|
|
||||||
/* fall back to polling */
|
|
||||||
VIR_DEBUG("Sleeping for %dms", LOCKSPACE_SLEEP);
|
|
||||||
g_usleep(LOCKSPACE_SLEEP * 1000);
|
|
||||||
#endif
|
|
||||||
VIR_DEBUG("Retrying to add lockspace (left %d)", retries);
|
VIR_DEBUG("Retrying to add lockspace (left %d)", retries);
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user