From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViPDU-00048T-9e for qemu-devel@nongnu.org; Mon, 18 Nov 2013 08:50:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ViPDO-0008Rn-Nv for qemu-devel@nongnu.org; Mon, 18 Nov 2013 08:50:16 -0500 Received: from mail-pd0-x235.google.com ([2607:f8b0:400e:c02::235]:45627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViPDO-0008Rc-Gm for qemu-devel@nongnu.org; Mon, 18 Nov 2013 08:50:10 -0500 Received: by mail-pd0-f181.google.com with SMTP id p10so6465176pdj.26 for ; Mon, 18 Nov 2013 05:50:09 -0800 (PST) Received: from debian.bits-pilani.ac.in ([115.249.18.25]) by mx.google.com with ESMTPSA id gg10sm23610095pbc.46.2013.11.18.05.50.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Nov 2013 05:50:08 -0800 (PST) From: Varad Gautam Date: Mon, 18 Nov 2013 19:19:47 +0530 Message-Id: <1384782589-9333-1-git-send-email-varadgautam@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] =?utf-8?q?First_Patch=2C_Requesting_Comments?= =?utf-8?b?4oCP?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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