Received: from eggs.gnu.org ([2001:4830:134:3::10]:46869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViPIa-0007Jq-U3 for qemu-devel@nongnu.org; Mon, 18 Nov 2013 08:55:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ViPIV-0001xR-Co for qemu-devel@nongnu.org; Mon, 18 Nov 2013 08:55:32 -0500 Received: from mail-pb0-x22f.google.com ([2607:f8b0:400e:c01::22f]:40139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViPIV-0001xK-5g for qemu-devel@nongnu.org; Mon, 18 Nov 2013 08:55:27 -0500 Received: by mail-pb0-f47.google.com with SMTP id um1so322487pbc.34 for ; Mon, 18 Nov 2013 05:55:26 -0800 (PST) Received: from debian.bits-pilani.ac.in ([115.249.18.25]) by mx.google.com with ESMTPSA id xv2sm23644925pbb.39.2013.11.18.05.55.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Nov 2013 05:55:24 -0800 (PST) From: Varad Gautam Date: Mon, 18 Nov 2013 19:25:08 +0530 Message-Id: <1384782909-9438-1-git-send-email-varadgautam@gmail.com> Subject: [Qemu-devel] First Patch, Requesting Review 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