Re: [PATCH 0/2] Alter refresh algorithm for volWipe

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

 




On 08/25/2017 05:44 AM, Martin Kletzander wrote:
> On Thu, Aug 24, 2017 at 06:28:27PM -0400, John Ferlan wrote:
>> Alter wipeVol to do same refresh operation as pool refresh would do.
>>
> 
> I think we should rather keep the format as it is.  Did I miss something
> here or isn't the source of the problem just the fact that we wipe the
> volume without keeping the format?
> 

Once you "wipe" the file/image the format that was there (such as qcow2
as noted in the bz from patch2) is no longer there.

Consider the following sequence:

virsh vol-create-as default bz 10M --format qcow2

virsh vol-dumpxml bz default | grep format
    <format type='qcow2'/>

qemu-img info /home/vm-images/bz
image: /home/vm-images/bz
file format: qcow2
virtual size: 10M (10485760 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 0.10
    refcount bits: 16

virsh vol-wipe bz default

qemu-img info /home/vm-images/bz
image: /home/vm-images/bz
file format: raw
virtual size: 196K (200704 bytes)
disk size: 196K

virsh vol-dumpxml bz default | grep format
    <format type='qcow2'/>

(without the patch in 2/2 of course)

BTW: I did consider just changing the format to RAW regardless, but
figured that was just too simple and may not be the right answer for
every case.

John

>> John Ferlan (2):
>>  storage: Introduce virStorageBackendRefreshVolTargetUpdate
>>  storage: Use virStorageBackendRefreshVolTargetUpdate after wipeVol
>>
>> src/storage/storage_driver.c |  7 ++--
>> src/storage/storage_util.c   | 82
>> +++++++++++++++++++++++++++++---------------
>> src/storage/storage_util.h   |  3 ++
>> 3 files changed, 62 insertions(+), 30 deletions(-)
>>
>> -- 
>> 2.9.5
>>
>> -- 
>> libvir-list mailing list
>> libvir-list@xxxxxxxxxx
>> https://www.redhat.com/mailman/listinfo/libvir-list

--
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]
  Powered by Linux