Re: [libvirt] [PATCH 09/12] storage: Cleanup failures in virStorageBackendCreateRaw

2015-10-14 Thread Peter Krempa
On Tue, Oct 13, 2015 at 16:12:46 -0400, John Ferlan wrote: > On 10/13/2015 08:43 AM, Peter Krempa wrote: > > On Fri, Oct 09, 2015 at 09:34:08 -0400, John Ferlan wrote: ... > >> @@ -520,6 +522,8 @@ virStorageBackendCreateRaw(virConnectPtr conn > >> ATTRIBUTE_UNUSED, > >> if

Re: [libvirt] [PATCH 09/12] storage: Cleanup failures in virStorageBackendCreateRaw

2015-10-14 Thread John Ferlan
On 10/14/2015 08:16 AM, Peter Krempa wrote: > On Tue, Oct 13, 2015 at 16:12:46 -0400, John Ferlan wrote: >> On 10/13/2015 08:43 AM, Peter Krempa wrote: >>> On Fri, Oct 09, 2015 at 09:34:08 -0400, John Ferlan wrote: > > ... > @@ -520,6 +522,8 @@ virStorageBackendCreateRaw(virConnectPtr

Re: [libvirt] [PATCH 09/12] storage: Cleanup failures in virStorageBackendCreateRaw

2015-10-14 Thread Peter Krempa
On Wed, Oct 14, 2015 at 09:35:24 -0400, John Ferlan wrote: > On 10/14/2015 08:16 AM, Peter Krempa wrote: > > On Tue, Oct 13, 2015 at 16:12:46 -0400, John Ferlan wrote: ... > > Erm, you've patched virFileOpenAs a few patches before this to do the > > right thing when creating the file so I don't

Re: [libvirt] [PATCH 09/12] storage: Cleanup failures in virStorageBackendCreateRaw

2015-10-14 Thread John Ferlan
On 10/14/2015 09:45 AM, Peter Krempa wrote: > On Wed, Oct 14, 2015 at 09:35:24 -0400, John Ferlan wrote: >> On 10/14/2015 08:16 AM, Peter Krempa wrote: >>> On Tue, Oct 13, 2015 at 16:12:46 -0400, John Ferlan wrote: > > ... > >>> Erm, you've patched virFileOpenAs a few patches before this to do

Re: [libvirt] [PATCH 09/12] storage: Cleanup failures in virStorageBackendCreateRaw

2015-10-13 Thread Peter Krempa
On Fri, Oct 09, 2015 at 09:34:08 -0400, John Ferlan wrote: > If the volume target path doesn't exist prior to calling virFileOpenAs and > we have a successful call, then we know we've had a successful creation. > For any other failures in the function we should clean up after ourselves > by using

Re: [libvirt] [PATCH 09/12] storage: Cleanup failures in virStorageBackendCreateRaw

2015-10-13 Thread John Ferlan
On 10/13/2015 08:43 AM, Peter Krempa wrote: > On Fri, Oct 09, 2015 at 09:34:08 -0400, John Ferlan wrote: >> If the volume target path doesn't exist prior to calling virFileOpenAs and >> we have a successful call, then we know we've had a successful creation. >> For any other failures in the

[libvirt] [PATCH 09/12] storage: Cleanup failures in virStorageBackendCreateRaw

2015-10-09 Thread John Ferlan
If the volume target path doesn't exist prior to calling virFileOpenAs and we have a successful call, then we know we've had a successful creation. For any other failures in the function we should clean up after ourselves by using virFileDelete if we're about to return failure. Signed-off-by: