Re: [PATCH 1/2] storage: Switch to new def on pool-destroy

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

 



On 25.06.2012 12:36, Daniel P. Berrange wrote:
> On Mon, Jun 25, 2012 at 12:32:47PM +0200, Michal Privoznik wrote:
>> Currently, we share the idea of old & new def with domains. Users can
>> *-edit an object (domain, pool) which spawns a new internal
>> representation for them. This is referenced via
>> {domainObj,poolObj}->newDef [compared to ->def]. However, for pool we
>> were never overwriting def with newDef. This must be done on
>> pool-destroy (like we do analogically in domain detroy).
>> ---
>>  src/storage/storage_driver.c |    5 ++++-
>>  1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
>> index 88f3809..3b95c70 100644
>> --- a/src/storage/storage_driver.c
>> +++ b/src/storage/storage_driver.c
>> @@ -794,6 +794,10 @@ storagePoolDestroy(virStoragePoolPtr obj) {
>>      if (pool->configFile == NULL) {
>>          virStoragePoolObjRemove(&driver->pools, pool);
>>          pool = NULL;
>> +    } else if (pool->newDef) {
>> +        virStoragePoolDefFree(pool->def);
>> +        pool->def = pool->newDef;
>> +        pool->newDef = NULL;
>>      }
>>      ret = 0;
>>  
>> @@ -804,7 +808,6 @@ cleanup:
>>      return ret;
>>  }
>>  
>> -
>>  static int
>>  storagePoolDelete(virStoragePoolPtr obj,
>>                    unsigned int flags) {
> 
> ACK,
> 
> while you're looking at this,  pool-dumpxml and net-dumpxml are both
> missing support for the --inactive flag, to view the inactive XML
> while running
> 
> Daniel
> 

Thanks, pushed.

Actually, pool-dumpxml is being fixed in 2/2 (which we agreed I'll send
v2) and net-dumpxml was enhanced just recently - since
52d064f42dbc857f4096dc60c0335395ffac73aa. If I didn't look into this I
wouldn't notice neither.

Michal

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