Re: [PATCH] storage: Don't update pool available/allocation pool if vol-create-as fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/08/2014 05:38 PM, John Ferlan wrote:
> 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().
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
> I did try to make storageVolDelete() just be a shim to
> storageVolDeleteInternal(), but ran afoul of check-aclrules.pl
> since the EnsureAcl wasn't in storageVolDelete().
> 

Yeah, the EnsureAcl has to be in the function matching the public API,
but the bulk of the work can indeed be in the internal helper function.

> @@ -1634,7 +1657,6 @@ storageVolDelete(virStorageVolPtr obj,
>      return ret;
>  }
>  
> -
>  static virStorageVolPtr

Spurious whitespace change.

ACK with that fix.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]