From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlK6N-0007iW-ST for qemu-devel@nongnu.org; Thu, 12 Jan 2012 07:50:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlK6I-0001ym-4C for qemu-devel@nongnu.org; Thu, 12 Jan 2012 07:49:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlK6H-0001yh-QA for qemu-devel@nongnu.org; Thu, 12 Jan 2012 07:49:50 -0500 Message-ID: <4F0ED7B3.2000904@redhat.com> Date: Thu, 12 Jan 2012 13:53:07 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1325858501-25741-1-git-send-email-stefanha@linux.vnet.ibm.com> <1325858501-25741-5-git-send-email-stefanha@linux.vnet.ibm.com> <4F0EBD12.7080702@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 04/15] block: add image streaming block job List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Luiz Capitulino , Marcelo Tosatti , Stefan Hajnoczi , qemu-devel@nongnu.org Am 12.01.2012 12:39, schrieb Stefan Hajnoczi: > On Thu, Jan 12, 2012 at 10:59 AM, Kevin Wolf wrote: >> Am 06.01.2012 15:01, schrieb Stefan Hajnoczi: >>> + buf = qemu_blockalign(bs, STREAM_BUFFER_SIZE); >>> + s->common.len = bdrv_getlength(bs); >> >> No error check? > > Will fix. > >>> + bdrv_get_geometry(bs, (uint64_t *)&end); >> >> Why call bdrv_getlength() twice? end = s->common.len >> BDRV_SECTOR_BITS >> should be the same. > > Okay, I'll change it. I got sick of BDRV_SECTOR_* and called twice instead. Well, you can try and change everything in the streaming code to bytes instead of sectors. We should probably do this sooner or later anyway. Sectors of 512 bytes are a completely arbitrary unit that doesn't make much sense generally. Kevin