Skip to contentSkip to conversation

qemu-io read do not dump buffer when in quiet mode

Qemu-devel Junpeng.Li 2 participants 3 messages Apr 20, 2018 – Apr 21, 2018

lore
Share & tools
lore

Junpeng.Li

author
#0 lore raw

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

#1 lore raw
Quoted 21 lines · Junpeng.Li

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);
    }
Quoted 1 line

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.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
author
#2 lore raw
Quoted 22 lines · Eric Blake
Quoted 21 lines · Junpeng.Li

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);
    }
Quoted 6 lines
Quoted 1 line

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