Re: [libvirt] [PATCH 3/5]: Set format type to LVM2 on NULL format

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

 



Daniel P. Berrange wrote:
> On Tue, Oct 21, 2008 at 03:57:07PM +0200, Chris Lalancette wrote:
>> Again because of my generic VIR_ENUM_IMPL patch last week, I unwittingly caused
>> a regression in the storage_backend_logical driver.  Previously, if you
>> submitted logical pool XML that had no <source><format type='lvm2'/> string, it
>> would just default to VIR_STORAGE_POOL_LOGICAL_LVM2.  This would succeed just
>> fine and go on with life.  This is no longer the case, and now XML without the
>> format tag fails to define.  To maintain backwards compatibility with already
>> existing XML that expects this, add a compatibility wrapper to return
>> VIR_STORAGE_POOL_LOGICAL_LVM2 on an empty format tag.
> 
> I think I'd rather that we add a field to the .poolOptions struct
> called  defaultFormat, and just do
> 
>   .defaultFormat = VIR_STORAGE_POOL_LOGICAL_LVM2
> 
> And then in the storage_conf.c method where we're parsing formats,
> if we get a NULL format, explicitly set it to the default. We'd
> want todo this for all drivers that support formats, not just LVM.
> 
> Then we wouldn't need to wrap the FromString methods.

Yeah, that would work fine, and is more generic.  I'll implement it that way.

Chris Lalancette

--
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]