[libvirt] [PATCH 4/8] storage: lvm: Separate creating of the volume from building
Michael Chapman
mike at very.puzzling.org
Wed Feb 12 10:54:45 UTC 2014
On Wed, 12 Feb 2014, Ján Tomko wrote:
>> --- a/src/storage/storage_driver.c
>> +++ b/src/storage/storage_driver.c
>> @@ -1828,6 +1828,10 @@ storageVolCreateXMLFrom(virStoragePoolPtr obj,
>> pool->volumes.objs[pool->volumes.count++] = newvol;
>> volobj = virGetStorageVol(obj->conn, pool->def->name, newvol->name,
>> newvol->key, NULL, NULL);
>> + if (!volobj) {
>> + pool->volumes.count--;
>> + goto cleanup;
>> + }
>>
>> /* Drop the pool lock during volume allocation */
>> pool->asyncjobs++;
>
> ACK to this patch. No matter what way we fix the actual bug, virGetStorageVol
> can still return NULL when we're out of memory. Would you like to write a
> commit message and send it as a formal patch, or shall I do it?
I'll send a patch through shortly.
Cheers,
Michael
More information about the libvir-list
mailing list