virISCSIDirectReportLuns: Drop ClearVols

In bf5cf610f206d5d54 I've fixed a problem where iscsi-direct
backend was reporting only the last LUN. The fix consisted of
moving virStoragePoolObjClearVols() one level up. However, as it
turns out, storage driver already calls it before calling
refreshPool callback (which is
virStorageBackendISCSIDirectRefreshPool() in this case).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Michal Privoznik 2019-02-28 17:43:57 +01:00
parent 9bf194c23f
commit f8aecea779

View File

@ -375,7 +375,6 @@ virISCSIDirectReportLuns(virStoragePoolObjPtr pool,
def->capacity = 0;
def->allocation = 0;
virStoragePoolObjClearVols(pool);
for (i = 0; i < list->num; i++) {
if (virISCSIDirectRefreshVol(pool, iscsi, list->luns[i], portal) < 0)
goto cleanup;