Re: [PATCH 4/8] storage: lvm: Separate creating of the volume from building

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]