Re: [PATCHv2 1/2] DUPLICATE: util: Add function to check if a virStorageSource is "empty"

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

 



On 09/11/14 20:06, Eric Blake wrote:
> On 09/11/2014 11:54 AM, Peter Krempa wrote:
>> To express empty drive we historically use storage source with empty
>> path. Unfortunately NBD disks may be declared without a path.
>>
>> Add a helper to wrap this logic.
>> ---
>>  src/libvirt_private.syms  |  1 +
>>  src/util/virstoragefile.c | 20 ++++++++++++++++++++
>>  src/util/virstoragefile.h |  1 +
>>  3 files changed, 22 insertions(+)
> 
> ACK.
> 
> If I remember right from my virDomainBlockCopy code (commit 37588b25),
> empty paths are allowed for device types of cdrom, floppy, and lun, but
> forbidden at parse time for type='block'<disk device='cdrom'> and <disk
> device='floppy'> but notionally forbidden for <disk device='disk'>.
> 
> 
>> + * Returns true if @src points to an empty storage source.
>> + */
>> +bool
>> +virStorageSourceIsEmpty(virStorageSourcePtr src)
> 
> Maybe the comment is better as:
> 
> Returns true if the guest disk has no associated host storage source
> (such as an empty cdrom drive).
> 

Sounds better. I've changed the comment and pushed this patch.

Peter

Attachment: signature.asc
Description: OpenPGP digital signature

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