]> xenbits.xensource.com Git - libvirt.git/commit
storage: Don't update pool available/allocation if buildVol fails
authorJohn Ferlan <jferlan@redhat.com>
Tue, 8 Apr 2014 22:54:14 +0000 (18:54 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 9 Apr 2014 10:57:37 +0000 (06:57 -0400)
commit0c2305b31c283bc98cab7261d3021ce1a9a0b713
treeddf5636c8b8fc519fbca9c8ddc5e60dcd7462b9c
parenta18c71301363d9accec5c26e8798b2615e68ef05
storage: Don't update pool available/allocation if buildVol fails

https://bugzilla.redhat.com/show_bug.cgi?id=1024159

If adding a volume to a storage pool fails during the CreateXML or
CreateXMLFrom API's, we don't want to adjust the available and
allocation values for the storage pool during storageVolDelete
since we haven't adjusted the values for the create.

Refactor storageVolDelete() a bit to create a storageVolDeleteInternal()
which will handle the primary deletion activities.  Add a parameter
updateMeta which will signify whether to update the values or not.

Adjust the calls from CreateXML and CreateXMLFrom to directly call the
DeleteInternal with the pool lock held.  This does bypass the call
to virStorageVolDeleteEnsureACL().
src/storage/storage_driver.c