[libvirt] [REPOST PATCH 2/6] storage: Cleanup failures virStorageBackendCreateExecCommand

Ján Tomko jtomko at redhat.com
Tue Nov 3 09:13:34 UTC 2015


On Wed, Oct 28, 2015 at 07:54:49AM -0400, John Ferlan wrote:
> After a successful qemu-img/qcow-create of the backing file, if we
> fail to stat the file, change it owner/group, or mode, then the
> cleanup path should delete the file.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/storage/storage_backend.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
> index 037d6d7..487c914 100644
> --- a/src/storage/storage_backend.c
> +++ b/src/storage/storage_backend.c
> @@ -678,6 +678,7 @@ virStorageBackendCreateExecCommand(virStoragePoolObjPtr pool,
>      gid_t gid;
>      uid_t uid;
>      mode_t mode;
> +    bool filecreated = false;

This variable was removed in the previous patch, reordering them would
remove the need for that.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20151103/4def8d8a/attachment-0001.sig>


More information about the libvir-list mailing list