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