Hi! I'm new here, and am working on my first bug. I have posted a patch
for Bug#603872 [1] to the list.. It's incomplete right now, but please
have a look and tell me if I'm headed in the right direction. (I don't
know if I can send incomplete patches to the mailing list for suggestions
or if I run into some problems.)
Usecase: `qemu-img convert` with -p now shows the write speed.
I have a few doubts relating to the patch.
1. I'm calculating the speed using the time taken to run the for(;;)
at qemu-img.c:1477. I figured that every time this loop runs, n1
sectors are converted, and so I calculate the write_speed
accordingly. Is this correct?
2. I have changed qemu-progress.c:qemu_progress_print() to take in a
speed parameter, thinking that it would be the best option. Should I
do it some other way instead (maybe write another function to print
just speed)?
Also, what does IO_BUF_SIZE in the same file relate to?
Thanks.
Varad
[1] https://bugs.launchpad.net/qemu/+bug/603872