qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-io read do not dump buffer when in quiet mode
@ 2018-04-20 16:14 Junpeng.Li
  2018-04-20 19:06 ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Junpeng.Li @ 2018-04-20 16:14 UTC (permalink / raw)
  To: qemu-devel


Hi, everyone. I found a question or maybe a bug during use qemu-io to read
a range file and take the params -vq to dump buffer and do not show
I/O statistics. I use the params -vq what i want is just dump buffer
but do not show I/O statistics, but as the result show it is not.

Like below command, it do not dump buffer to standard output.

qemu-io -r -c "read -vq 0 1024" /tmp/test.qcow2

I saw the source code, when has qflag value it just goto out and do
not dump buffer when qflag and vflag has value at the same time.

    if (qflag) {
        goto out;
    }

    if (vflag) {
        dump_buffer(buf, offset, qiov.size);
    }

quiet mode here, it mean do not show I/O statistics or mean complete quiet?

--
BestRegard,
JPL

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] qemu-io read do not dump buffer when in quiet mode
  2018-04-20 16:14 [Qemu-devel] qemu-io read do not dump buffer when in quiet mode Junpeng.Li
@ 2018-04-20 19:06 ` Eric Blake
  2018-04-21  4:46   ` Junpeng.Li
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2018-04-20 19:06 UTC (permalink / raw)
  To: Junpeng.Li, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]

On 04/20/2018 11:14 AM, Junpeng.Li wrote:
> 
> Hi, everyone. I found a question or maybe a bug during use qemu-io to read
> a range file and take the params -vq to dump buffer and do not show
> I/O statistics. I use the params -vq what i want is just dump buffer
> but do not show I/O statistics, but as the result show it is not.
> 
> Like below command, it do not dump buffer to standard output.
> 
> qemu-io -r -c "read -vq 0 1024" /tmp/test.qcow2
> 
> I saw the source code, when has qflag value it just goto out and do
> not dump buffer when qflag and vflag has value at the same time.
> 
>     if (qflag) {
>         goto out;
>     }
> 
>     if (vflag) {
>         dump_buffer(buf, offset, qiov.size);
>     }
> 
> quiet mode here, it mean do not show I/O statistics or mean complete quiet?

You're welcome to provide a patch to make it have saner behavior.  As
long as running qemu-iotests doesn't break, we are pretty much free to
refactor qemu-io as it is more a tool for internal testing than for
external use.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] qemu-io read do not dump buffer when in quiet mode
  2018-04-20 19:06 ` Eric Blake
@ 2018-04-21  4:46   ` Junpeng.Li
  0 siblings, 0 replies; 3+ messages in thread
From: Junpeng.Li @ 2018-04-21  4:46 UTC (permalink / raw)
  To: Eric Blake; +Cc: qemu-devel

Eric Blake <eblake@redhat.com> writes:

> On 04/20/2018 11:14 AM, Junpeng.Li wrote:
>> 
>> Hi, everyone. I found a question or maybe a bug during use qemu-io to read
>> a range file and take the params -vq to dump buffer and do not show
>> I/O statistics. I use the params -vq what i want is just dump buffer
>> but do not show I/O statistics, but as the result show it is not.
>> 
>> Like below command, it do not dump buffer to standard output.
>> 
>> qemu-io -r -c "read -vq 0 1024" /tmp/test.qcow2
>> 
>> I saw the source code, when has qflag value it just goto out and do
>> not dump buffer when qflag and vflag has value at the same time.
>> 
>>     if (qflag) {
>>         goto out;
>>     }
>> 
>>     if (vflag) {
>>         dump_buffer(buf, offset, qiov.size);
>>     }
>> 
>> quiet mode here, it mean do not show I/O statistics or mean complete quiet?
>
> You're welcome to provide a patch to make it have saner behavior.  As
> long as running qemu-iotests doesn't break, we are pretty much free to
> refactor qemu-io as it is more a tool for internal testing than for
> external use.
Sorry for my question description and thanks your explanation.

--
BestRegard,
JPL

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-21  4:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-20 16:14 [Qemu-devel] qemu-io read do not dump buffer when in quiet mode Junpeng.Li
2018-04-20 19:06 ` Eric Blake
2018-04-21  4:46   ` Junpeng.Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).