[libvirt] [PATCH 00/12] Have 'buildVol' callers to clean up after themselves

John Ferlan jferlan at redhat.com
Tue Oct 13 22:34:59 UTC 2015



On 10/09/2015 09:33 AM, John Ferlan wrote:
> NOTE: Although one may consider this a v2 of :
> 
> http://www.redhat.com/archives/libvir-list/2015-October/msg00196.html
> 
> It's more tackling the same problem a different way...
> 
> Rather than pass a 'created' boolean around, this series investigated
> each of the 'createVol' and 'buildVol' paths in order to make more
> conscious decisions related to whether or not a volume was created and
> to handle failures after creation by deleting the volume/file.
> 
> The end result is that all the 'buildVol' backends will now delete
> the volume they created on error paths leaving the storage driver to
> only need to remove the volume from the pool.
> 
> As such this series will also revert a prior patch in this area.
> 
> John Ferlan (12):
>   storage: Remove duplicitous refreshVol in RBD buildVol
>   storage: Remove duplicitous refreshVol in Sheepdog buildVol
>   storage: Fix a resource leak in storageVolCreateXML
>   storage: Track successful creation of LV for removal
>   storage: On error unlink created file in virFileOpen{As|Forked}
>   storage: On error rmdir created directory in virDirCreate[NoFork]
>   storage: Rework error paths for virStorageBackendCreateExecCommand
>   storage: Cleanup failures virStorageBackendCreateExecCommand
>   storage: Cleanup failures in virStorageBackendCreateRaw
>   storage: Pull volume removal from pool in storageVolDeleteInternal
>   Revert "storage: Prior to creating a volume, refresh the pool"
>   storage: On 'buildVol' failure don't delete the volume
> 
>  src/storage/storage_backend.c          | 38 +++++++++++++++++------
>  src/storage/storage_backend_logical.c  |  5 ++-
>  src/storage/storage_backend_rbd.c      |  3 --
>  src/storage/storage_backend_sheepdog.c |  5 +--
>  src/storage/storage_driver.c           | 56 ++++++++++++++++++++--------------
>  src/util/virfile.c                     | 22 ++++++++++++-
>  6 files changed, 88 insertions(+), 41 deletions(-)
> 

Pushed patches 1-7 after adjusting comments in patch 5 & 6.  Waiting for
feedback on 8, 9, and 12...

Tks for the quick review!

John




More information about the libvir-list mailing list