[libvirt] [PATCH 1/2] storage: Need to ensure removal of voldef from driver list

Ján Tomko jtomko at redhat.com
Wed May 7 12:52:12 UTC 2014


On 05/07/2014 02:08 AM, John Ferlan wrote:
> If for some reason a volume cannot be built in the pool (eg, the
> buildVol call fails), then the error code may or may not properly
> remove the volume from the pool->volumes.objs[] list.
> 
> Removal from the list is dependent on the 'deleteVol()' being present
> in the backend *and* calling it returning success. If either failed,
> then the volobj would never be removed from the list until a pool
> refresh was done (or libvirtd restarted).
> 
> Note: This is true prior to commit id '0c2305b3' as well where
> the cleanup would have been called prior to removal, but removal
> never occurred due to various goto statements.
> 
> Since the volume would have been added to the list prior to the
> attempt to build the volume, modify the storageVolDeleteInternal()
> to perform removal during cleanup.

This makes sense when we're cleaning up after a failed buildVol, but we
shouldn't be removing the volume from the list when the StorageVolumeDelete
API was called and volume deletion is not supported by the backend or when
the deletion failed.

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140507/01918263/attachment-0001.sig>


More information about the libvir-list mailing list