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:
Pavel Hrdina 2020-06-24 00:10:54 +02:00
parent 95037c48ef
commit c495169478
2 changed files with 0 additions and 15 deletions

View 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"

View 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;
}