[libvirt] [PATCH] scsi: Force error for SCSI pools on virStorageBackendSCSIFindLUs failure

John Ferlan jferlan at redhat.com
Tue Jun 23 18:50:14 UTC 2015


Related to :

https://bugzilla.redhat.com/show_bug.cgi?id=1171933

Rather than ignore the return status from virStorageBackendSCSIFindLUs,
cause a failure to start the pool if a -1 is returned. Issue was noted
during testing of the bz for iscsi that 'scsi' and 'fc' pools don't fail.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/storage/storage_backend_scsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
index b426145..a593a2b 100644
--- a/src/storage/storage_backend_scsi.c
+++ b/src/storage/storage_backend_scsi.c
@@ -935,7 +935,8 @@ virStorageBackendSCSIRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED,
     if (virStorageBackendSCSITriggerRescan(host) < 0)
         goto out;
 
-    ignore_value(virStorageBackendSCSIFindLUs(pool, host));
+    if (virStorageBackendSCSIFindLUs(pool, host) < 0)
+        goto out;
 
     ret = 0;
  out:
-- 
2.1.0




More information about the libvir-list mailing list