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

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



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

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