Re: [PATCH] qemu: Refactor parsing of block device IO tuning parameters.

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

 



On Thu, Aug 09, 2012 at 10:48:42 +0200, Peter Krempa wrote:
> This patch refactors the JSON parsing function that extracts the block
> IO tuning parameters from qemu's output. The most impacting change
> concerns the error message that is returned if the reply from qemu does
> not contain the needed data. The data for IO parameter tuning were added
> in qemu 1.1 and the previous error message was confusing.
> 
> This patch also breaks long lines and extracts a multiple time used code
> pattern to a macro.
> ---
> Old error message looks like:
> # virsh blkdeviotune asdf hda
> error: Unable to get block I/O throttle parameters
> error: internal error cannot read total_bytes_sec
> 
> and the new:
> # virsh blkdeviotune asdf hda
> error: Unable to get block I/O throttle parameters
> error: internal error block_io_throttle field 'total_bytes_sec' missing in qemu's output

I think the old/new error messages can be included directly in the commit
message. Anyway, I wonder if we should take this as an opportunity to fix the
"internal error", however I'm not sure what is the best code to use. It seems
we use OPERATION_INVALID in such cases, which could be good enough.

ACK

Jirka

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