[libvirt] [libvirt PATCH] storage: Skip not active lv volumes

Osier Yang jyang at redhat.com
Wed May 8 04:12:43 UTC 2013


On 07/05/13 22:47, Eric Blake wrote:
> On 05/07/2013 04:29 AM, Osier Yang wrote:
>> If the volume is of a clustered volume group, and not active, the
>> related pool APIs fails on open /dev/vg/lv. If the volume is suspended,
>> it hangs on open(2) the volume.
>>
>> Though the best solution is to expose the volume status in volume
>> XML, and even better to provide API to active/deactive the volume,
> s,active/deactive,activate/deactivate,
>
>> but it's not the work I want to touch currently. Volume status in
>> other status is just fine to skip.
> Yeah, nice ideas for future improvement, and not as important as fixing
> the bug now.
>
>> About the 5th field of lv_attr (from man lvs[8])
>> <quote>
>>   5 State: (a)ctive, (s)uspended, (I)nvalid snapshot, invalid
>>     (S)uspended snapshot, snapshot (m)erge failed,suspended
>>     snapshot (M)erge failed, mapped (d)evice present without
>>     tables,  mapped device present with (i)nactive table
>> </quote>
>> ---
>>   src/storage/storage_backend_logical.c | 29 +++++++++++++++++++----------
>>   1 file changed, 19 insertions(+), 10 deletions(-)
> ACK.
>
>>       int i, err, nextents, nvars, ret = -1;
>> +    const char *attrs = groups[9];
>> +
>> +    /* Skip not active volume */
> s/not active/inactive/
>
Thanks, pushed with the changes.




More information about the libvir-list mailing list