m4: virt-sanlock: drop check for sanlock_write_lockspace()

Function sanlock_write_lockspace() was introduced in 2.7 version 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:20:08 +02:00
parent ab7204d908
commit 121d980bbb
2 changed files with 0 additions and 30 deletions

View File

@@ -178,20 +178,10 @@ virLockManagerSanlockInitLockspace(virLockManagerSanlockDriverPtr driver,
{
int ret;
#ifdef HAVE_SANLOCK_IO_TIMEOUT
const int max_hosts = 0; /* defaults used in sanlock_init() implementation */
const unsigned int lockspaceFlags = 0;
ret = sanlock_write_lockspace(ls, max_hosts, lockspaceFlags, driver->io_timeout);
#else
if (driver->io_timeout) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("unable to use io_timeout with this version of sanlock"));
return -ENOTSUP;
}
ret = sanlock_init(ls, NULL, 0, 0);
#endif
return ret;
}
@@ -349,16 +339,7 @@ virLockManagerSanlockSetupLockspace(virLockManagerSanlockDriverPtr driver)
* or we can fallback to polling.
*/
retry:
#ifdef HAVE_SANLOCK_IO_TIMEOUT
rv = sanlock_add_lockspace_timeout(&ls, 0, driver->io_timeout);
#else
if (driver->io_timeout) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("unable to use io_timeout with this version of sanlock"));
goto error;
}
rv = sanlock_add_lockspace(&ls, 0);
#endif
if (rv < 0) {
if (-rv == EINPROGRESS && --retries) {
/* we have this function which blocks until lockspace change the