First Patch, Requesting Comments
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
Hi Varad,
Quoted 6 lines · Varad Gautam
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.)
Yes, you can post patches that you'd like to receive comments for, just mark them appropriately, e.g. RFC instead of PATCH. Also cc the maintainer of the code you're touching to increase chances for review, see files MAINTAINERS and scripts/get_maintainer.pl.
Quoted 3 lines
Usecase:
qemu-img convertwith -p now shows the write speed.I have a few doubts relating to the patch.
To discuss the code you really should post the patch, I couldn't find any related code by your link.
Quoted 11 lines
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_speedaccordingly. 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_SIZEin the same file relate to?
Looks like disk I/O processing unit for qemu-img.
Quoted 4 lines
Thanks.
Varad
Signature · 2 lines
Thanks. -- Max
Re: [Qemu-devel] First Patch, Requesting Comments
Quoted 2 lines
To discuss the code you really should post the patch, I couldn't find any related code by your link.
Hi! I had posted the patch onto the list. I have also put it at [1] now.
Thanks.
Varad
Re: [Qemu-devel] First Patch, Requesting Comments
Am 18.11.2013 16:59, schrieb Varad Gautam:
Quoted 4 lines
Quoted 2 lines
To discuss the code you really should post the patch, I couldn't find any related code by your link.
Hi! I had posted the patch onto the list.
Unfortunately several copies of your mail arrived on the list today, and only one actually has the patch it talks about threaded to it. ;)
But welcome to the community, and you'll surely find out how to optimize your workflow for the second patch. :)
Cheers,
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] First Patch, Requesting Comments
Quoted 8 lines · Andreas Färber
Am 18.11.2013 16:59, schrieb Varad Gautam:
Quoted 4 lines
Quoted 2 lines
To discuss the code you really should post the patch, I couldn't find any related code by your link.
Hi! I had posted the patch onto the list.
Unfortunately several copies of your mail arrived on the list today, and only one actually has the patch it talks about threaded to it. ;)
Often-times, this happens when a new contributor fails to realize that the list is moderated, but that we will moderate non-subscriber's messages through. What commonly happens is that a new contributor sends a message, sees nothing on the archives, so they then subscribe, then send again under the assumption that it would help; and sometimes even send a third time when getting impatient that it hasn't shown up in list archives. Then, a few hours later, when the moderator finally releases the gates on the first-time post (a delay which happens whether you posted as a subscriber or non-subscriber), all of the multiple pending messages hit the list, making the new poster sound redundant.
Varad, as a new contributor, you are in a position to possibly help us:
what documentation pages did you read to learn where to post your patches, so that we can try and modify those pages to give more hints to help the next guy avoid the embarrassment of double posting?
Quoted 3 lines
But welcome to the community, and you'll surely find out how to optimize your workflow for the second patch. :)
Indeed. And if you haven't already found it,
http://wiki.qemu.org/Contribute/SubmitAPatch is a great resource (and again, knowing what pages you HAVE found may help us figure out if we can tweak those pages to more prominently point to this page).
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Re: [Qemu-devel] First Patch, Requesting Comments
Quoted 10 lines · Eric Blake
Often-times, this happens when a new contributor fails to realize that the list is moderated, but that we will moderate non-subscriber's messages through. What commonly happens is that a new contributor sends a message, sees nothing on the archives, so they then subscribe, then send again under the assumption that it would help; and sometimes even send a third time when getting impatient that it hasn't shown up in list archives. Then, a few hours later, when the moderator finally releases the gates on the first-time post (a delay which happens whether you posted as a subscriber or non-subscriber), all of the multiple pending messages hit the list, making the new poster sound redundant.
Thanks. I was wondering what had happened to the mails when suddenly I saw a lot of them in my inbox!
Quoted 6 lines
Varad, as a new contributor, you are in a position to possibly help us:
what documentation pages did you read to learn where to post your patches, so that we can try and modify those pages to give more hints to help the next guy avoid the embarrassment of double posting?Quoted 1 line
Quoted 7 lines
Quoted 2 lines
But welcome to the community, and you'll surely find out how to optimize your workflow for the second patch. :)
Indeed. And if you haven't already found it,
http://wiki.qemu.org/Contribute/SubmitAPatch is a great resource (and again, knowing what pages you HAVE found may help us figure out if we can tweak those pages to more prominently point to this page).
Sure. I went through http://wiki.qemu.org/Documentation/GettingStartedDevelopers
and http://wiki.qemu.org/Contribute/SubmitAPatch wikis before sending out the patch. I guess it'd be useful to change these to avoid such happenings.
Thanks for the reply.
Varad
Re: [Qemu-devel] First Patch, Requesting Comments
Quoted 11 lines · Varad Gautam
Quoted 5 lines · Eric Blake
Varad, as a new contributor, you are in a position to possibly help us:
what documentation pages did you read to learn where to post your patches, so that we can try and modify those pages to give more hints to help the next guy avoid the embarrassment of double posting?Sure. I went through http://wiki.qemu.org/Documentation/GettingStartedDevelopers
and http://wiki.qemu.org/Contribute/SubmitAPatch wikis before sending out the patch. I guess it'd be useful to change these to avoid such happenings.
It's a wiki, so anyone else can make further edits, but I added words to both of these pages today.
One page I cannot edit (since I'm not a list moderator), but which would also be good to modify, is the actual list information page:
https://lists.nongnu.org/mailman/listinfo/qemu-devel
[List moderators - you may be interested in how libvirt does it:
https://www.redhat.com/mailman/listinfo/libvir-list
the trick is to fill in the 'Info' box on the mailman admin General Options page]
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org