[libvirt] [PATCH 1/2] storage: Fix issue finding LU's when block doesn't exist

John Ferlan jferlan at redhat.com
Thu Nov 20 15:22:57 UTC 2014



On 11/20/2014 09:12 AM, Michal Privoznik wrote:

<...snip...>

>> @@ -451,10 +451,10 @@ virStorageBackendSCSIFindLUs(virStoragePoolObjPtr pool,
>>               continue;
>>           }
>>
>> -        found = true;
>> -        VIR_DEBUG("Found LU '%s'", lun_dirent->d_name);
>> +        VIR_DEBUG("Found possible LU '%s'", lun_dirent->d_name);
>>
>> -        processLU(pool, scanhost, bus, target, lun);
>> +        if (processLU(pool, scanhost, bus, target, lun) == 0)
>> +            found = true;
> 
> Do we want 'break' here to jump out from the loop too?
> 

No as we need to find "all" LU's - this just indicates that we found at
least one.  The called function will add the LU's to the pool.

John
>>       }
>>
>>       if (!found)
>>
> 
> Either way, that's just an optimization, so ACK.
> 
> Michal
> 




More information about the libvir-list mailing list