]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
m4: virt-sanlock: drop check for SANLK_INQ_WAIT
authorPavel Hrdina <phrdina@redhat.com>
Tue, 23 Jun 2020 22:10:54 +0000 (00:10 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 10 Jul 2020 07:40:20 +0000 (09:40 +0200)
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>
m4/virt-sanlock.m4
src/locking/lock_driver_sanlock.c

index a7fba520dfc761704c267f5ad137d47f41636242..15a9bc6035f9d601125f20e80dacc9e64b528e09 100644 (file)
@@ -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"
index 9484a2e6e55a38a6e3ec26706d9f5dc9c112df2b..996db3e362001de0b1d8974159fee8fcd7b3ec36 100644 (file)
@@ -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;
         }