From b73dc2e56b94aca38e5f7e1b5a5ca1ee583b739a Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Fri, 13 May 2016 11:38:45 -0400 Subject: [PATCH] iscsi: Remove initiatoriqn from virISCSIScanTargets No longer necessary to have it, so remove it. (cherry picked from commit 027986f5bff0d89375e94e1344074f82eed27d7b) --- src/storage/storage_backend_iscsi.c | 8 ++------ src/util/viriscsi.c | 3 +-- src/util/viriscsi.h | 1 - tests/viriscsitest.c | 3 +-- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index 9e2d01e457..bccfba3fda 100644 --- a/src/storage/storage_backend_iscsi.c +++ b/src/storage/storage_backend_iscsi.c @@ -197,9 +197,7 @@ virStorageBackendISCSIFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED, if (!(portal = virStorageBackendISCSIPortal(source))) goto cleanup; - if (virISCSIScanTargets(portal, - source->initiator.iqn, - &ntargets, &targets) < 0) + if (virISCSIScanTargets(portal, &ntargets, &targets) < 0) goto cleanup; if (VIR_ALLOC_N(list.sources, ntargets) < 0) @@ -399,9 +397,7 @@ virStorageBackendISCSIStartPool(virConnectPtr conn, * iscsiadm doesn't let you login to a target, unless you've * first issued a 'sendtargets' command to the portal :-( */ - if (virISCSIScanTargets(portal, - pool->def->source.initiator.iqn, - NULL, NULL) < 0) + if (virISCSIScanTargets(portal, NULL, NULL) < 0) goto cleanup; if (virStorageBackendISCSISetAuth(portal, conn, &pool->def->source) < 0) diff --git a/src/util/viriscsi.c b/src/util/viriscsi.c index f4e32540eb..e705517a7d 100644 --- a/src/util/viriscsi.c +++ b/src/util/viriscsi.c @@ -307,7 +307,7 @@ virISCSIConnection(const char *portal, * portal. Without the sendtargets all that is received is a * "iscsiadm: No records found" */ - if (virISCSIScanTargets(portal, initiatoriqn, NULL, NULL) < 0) + if (virISCSIScanTargets(portal, NULL, NULL) < 0) goto cleanup; break; @@ -392,7 +392,6 @@ virISCSIGetTargets(char **const groups, int virISCSIScanTargets(const char *portal, - const char *initiatoriqn ATTRIBUTE_UNUSED, size_t *ntargetsret, char ***targetsret) { diff --git a/src/util/viriscsi.h b/src/util/viriscsi.h index f4093f7165..459249ee60 100644 --- a/src/util/viriscsi.h +++ b/src/util/viriscsi.h @@ -49,7 +49,6 @@ virISCSIRescanLUNs(const char *session) int virISCSIScanTargets(const char *portal, - const char *initiatoriqn, size_t *ntargetsret, char ***targetsret) ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK; diff --git a/tests/viriscsitest.c b/tests/viriscsitest.c index b5b0e203ed..40e4d101ff 100644 --- a/tests/viriscsitest.c +++ b/tests/viriscsitest.c @@ -145,8 +145,7 @@ testISCSIScanTargets(const void *data) virCommandSetDryRun(NULL, testIscsiadmCb, NULL); - if (virISCSIScanTargets(info->portal, NULL, - &ntargets, &targets) < 0) + if (virISCSIScanTargets(info->portal, &ntargets, &targets) < 0) goto cleanup; if (info->nexpected != ntargets) {