[libvirt] [PATCHv3 1/6] flags: use common dumpxml flags check
Eric Blake
eblake at redhat.com
Fri Jul 15 18:25:12 UTC 2011
On 07/15/2011 09:25 AM, Matthias Bolte wrote:
> 2011/7/15 Eric Blake <eblake at redhat.com>:
>> The previous patches only cleaned up ATTRIBUTE_UNUSED flags cases;
>> auditing the drivers found other places where flags was being used
>> but not validated. In particular, domainGetXMLDesc had issues with
>> clients accepting a different set of flags than the common
>> virDomainDefFormat helper function.
>>
>> * src/conf/domain_conf.c (virDomainDefFormat): Add common flag check.
>> * src/storage/storage_driver.c (storageVolumeCreateXMLFrom): Pass
>> 0 to drivers, since all flags are currently rejected.
>>
>> - buildret = backend->buildVolFrom(obj->conn, pool, newvol, origvol, flags);
>> + buildret = backend->buildVolFrom(obj->conn, pool, newvol, origvol, 0);
>>
>> storageDriverLock(driver);
>> virStoragePoolObjLock(pool);
>
> I don't think that this is a good idea. Even if the function doesn't
> have any flags at the moment this change will give us trouble when
> someone want's to add a flag to virStorageVolCreateXMLFrom that should
> have been passed down to the backend's buildVolFrom function.
Fair point, and hunk withdrawn.
>
> ACK, to a patch without this hunk.
Pushed.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110715/71d285ba/attachment-0001.sig>
More information about the libvir-list
mailing list