[libvirt] [PATCH v2 4/8] virISCSIDirectReportLuns: Drop ClearVols

Michal Privoznik posted 8 patches 6 years, 11 months ago
There is a newer version of this series
[libvirt] [PATCH v2 4/8] virISCSIDirectReportLuns: Drop ClearVols
Posted by Michal Privoznik 6 years, 11 months ago
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>
---
 src/storage/storage_backend_iscsi_direct.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/storage/storage_backend_iscsi_direct.c b/src/storage/storage_backend_iscsi_direct.c
index 613c38e225..1f33fadad9 100644
--- a/src/storage/storage_backend_iscsi_direct.c
+++ b/src/storage/storage_backend_iscsi_direct.c
@@ -377,7 +377,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;
-- 
2.19.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 4/8] virISCSIDirectReportLuns: Drop ClearVols
Posted by Pavel Hrdina 6 years, 11 months ago
On Wed, Mar 06, 2019 at 03:59:14PM +0100, Michal Privoznik wrote:
> 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>
> ---
>  src/storage/storage_backend_iscsi_direct.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list