SANLK_INQ_WAIT was introduced in sanlock 2.4 which is available in all
supported OSes.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
m4/virt-sanlock.m4 | 9 ---------
src/locking/lock_driver_sanlock.c | 6 ------
2 files changed, 15 deletions(-)
diff --git a/m4/virt-sanlock.m4 b/m4/virt-sanlock.m4
index a7fba520dfc..15a9bc6035f 100644
--- a/m4/virt-sanlock.m4
+++ b/m4/virt-sanlock.m4
@@ -25,15 +25,6 @@ AC_DEFUN([LIBVIRT_CHECK_SANLOCK],[
LIBVIRT_CHECK_PKG([SANLOCK], [libsanlock_client], [3.2.4])
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_libs="$LIBS"
CPPFLAGS="$CPPFLAGS $SANLOCK_CFLAGS"
diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index ea1c23eab69..cc8266a2b35 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -361,18 +361,12 @@ virLockManagerSanlockSetupLockspace(virLockManagerSanlockDriverPtr
driver)
#endif
if (rv < 0) {
if (-rv == EINPROGRESS && --retries) {
-#ifdef HAVE_SANLK_INQ_WAIT
/* we have this function which blocks until lockspace change the
* state. It returns 0 if lockspace has been added, -ENOENT if it
* hasn't. */
VIR_DEBUG("Inquiring lockspace");
if (sanlock_inq_lockspace(&ls, SANLK_INQ_WAIT) < 0)
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);
goto retry;
}
--
2.26.2