[libvirt] [PATCH] Don't check volume format for lvm backing store
Cole Robinson
crobinso at redhat.com
Mon Feb 16 22:50:09 UTC 2009
Daniel P. Berrange wrote:
> On Thu, Feb 12, 2009 at 02:37:33PM -0500, Cole Robinson wrote:
>> With the recently added COW support, we were trying to validate the
>> passed logical volume's format, when there won't ever be one pulled from
>> the xml (logical volumes don't have any valid format values).
>>
>> Just remove this check, and let any validation in this manner be done by
>> the actual call to 'lvcreate'.
>
> Oh, I got this the wrong way around - I was thinking that the
> VIR_STORAGE_POOL_LOGICAL_LVM2 was the volume type, but its
> actually the pool type.
>
>> diff --git a/src/storage_backend_logical.c b/src/storage_backend_logical.c
>> index 702a191..cbd2765 100644
>> --- a/src/storage_backend_logical.c
>> +++ b/src/storage_backend_logical.c
>> @@ -582,12 +582,6 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
>> const char **cmdargv = cmdargvnew;
>>
>> if (vol->backingStore.path) {
>> - if (vol->backingStore.format !=
>> - VIR_STORAGE_POOL_LOGICAL_LVM2) {
>> - virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR, "%s",
>> - _("LVM snapshots must be backed by another LVM volume"));
>> - return -1;
>> - }
>> cmdargv = cmdargvsnap;
>> }
>
>
> ACK
>
> Daniel
Pushed now.
Thanks,
Cole
More information about the libvir-list
mailing list