qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] First Patch, Requesting Comments‏
@ 2013-11-18 13:49 Varad Gautam
  2013-11-18 15:45 ` Max Filippov
  0 siblings, 1 reply; 9+ messages in thread
From: Varad Gautam @ 2013-11-18 13:49 UTC (permalink / raw)
  To: qemu-devel


Hi! I'm new here, and am working on my first bug. I have posted a patch
for Bug#603872 [1]. 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

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [Qemu-devel] First Patch, Requesting Comments
@ 2013-11-18 14:00 Varad Gautam
  0 siblings, 0 replies; 9+ messages in thread
From: Varad Gautam @ 2013-11-18 14:00 UTC (permalink / raw)
  To: qemu-devel

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

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

[-- Attachment #2: Type: text/html, Size: 1215 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [Qemu-devel] First Patch, Requesting Comments
@ 2013-11-18 14:06 Varad Gautam
  0 siblings, 0 replies; 9+ messages in thread
From: Varad Gautam @ 2013-11-18 14:06 UTC (permalink / raw)
  To: qemu-devel

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

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

[-- Attachment #2: Type: text/html, Size: 1223 bytes --]

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

end of thread, other threads:[~2013-11-18 19:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-18 13:49 [Qemu-devel] First Patch, Requesting Comments‏ Varad Gautam
2013-11-18 15:45 ` Max Filippov
2013-11-18 15:59   ` [Qemu-devel] First Patch, Requesting Comments Varad Gautam
2013-11-18 16:45     ` Andreas Färber
2013-11-18 17:01       ` Eric Blake
2013-11-18 18:41         ` Varad Gautam
2013-11-18 19:01           ` Eric Blake
  -- strict thread matches above, loose matches on Subject: below --
2013-11-18 14:00 Varad Gautam
2013-11-18 14:06 Varad Gautam

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).