Re: [PATCH 4/4] storage: Add checks for buildVol create file

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

 



On Tue, Oct 06, 2015 at 18:34:56 -0400, John Ferlan wrote:
> The buildVol function can fail in numerous ways, but for cleaner or
> clearer error path handling we want to know whether the calls we made
> actually created the volume prior to blindly deleting the volume.
> It could very well be that in between refreshing the pool, checking
> whether the volume was already in the pool, and trying to create the
> volume that something 'external' created a volume of the same name.
> In this case, failure is likely and since we didn't create the volume
> we shouldn't delete it either.
> 
> This patch may set the 'created' boolean for the following functions:
> 
> virStorageBackendCreateQemuImg (in virStorageBackendCreateExecCommand)
> virStorageBackendCreateQcowCreate (in virStorageBackendCreateExecCommand)
> virStorageBackendCreateFileDir (in virDirCreate)
> virStorageBackendCreateRaw (in virFileOpenAs)
> virStorageBackendRBDBuildVol
> virStorageBackendSheepdogBuildVol

Well, as in previous functions. Is there a reason that would inhibit the
actual functions that create the volume to clean it up afterwards in the
same function so that passing up the state would not be necessary?

Peter

Attachment: signature.asc
Description: 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]