[libvirt] [PATCH v2 1/1] fixed handling of sourceless disks in 'domblkinfo' cmd

Ján Tomko jtomko at redhat.com
Mon Oct 7 12:13:51 UTC 2019


On Fri, Oct 04, 2019 at 01:35:09PM +0200, Pavel Mores wrote:
>virDomainGetBlockInfo() returns error if called on a disk with no
>source (a sourceless disk might be a removable media drive with no
>media in it, for instance an empty CDROM or floppy drive).
>
>So far this caused the virsh domblkinfo --all command to abort and
>ignore any remaining (not yet displayed) disk devices.  This patch
>fixes the problem by first checking for existence of a <source>
>element in the corresponding XML.  If none is found, we avoid calling
>virDomainGetBlockInfo() altogether as we know it's bound to fail in
>that case.
>
>https://bugzilla.redhat.com/show_bug.cgi?id=1619625
>
>Signed-off-by: Pavel Mores <pmores at redhat.com>
>---
> tools/virsh-domain-monitor.c | 33 ++++++++++++++++++++-------------
> 1 file changed, 20 insertions(+), 13 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20191007/74044c1d/attachment-0001.sig>


More information about the libvir-list mailing list