Received: from eggs.gnu.org ([2001:4830:134:3::10]:43547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoQue-0002y5-VS for qemu-devel@nongnu.org; Wed, 21 Feb 2018 04:42:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoQua-0007Jb-9J for qemu-devel@nongnu.org; Wed, 21 Feb 2018 04:42:09 -0500 From: Alberto Garcia In-Reply-To: <20180220222459.8461-2-eblake@redhat.com> References: <20180220222459.8461-1-eblake@redhat.com> <20180220222459.8461-2-eblake@redhat.com> Date: Wed, 21 Feb 2018 10:42:00 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 1/2] qcow2: Prefer byte-based calls into bs->file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, mreitz@redhat.com, Kevin Wolf On Tue 20 Feb 2018 11:24:58 PM CET, Eric Blake wrote: > diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c > index d46b69d7f34..3fefeb3dc50 100644 > --- a/block/qcow2-refcount.c > +++ b/block/qcow2-refcount.c > @@ -2310,8 +2310,8 @@ write_refblocks: > on_disk_refblock = (void *)((char *) *refcount_table + > refblock_index * s->cluster_size); > > - ret = bdrv_write(bs->file, refblock_offset / BDRV_SECTOR_SIZE, > - on_disk_refblock, s->cluster_sectors); > + ret = bdrv_pwrite(bs->file, refblock_offset, > + on_disk_refblock, s->cluster_size); It looks like the second line is not properly indented. I think you can also move on_disk_refblock to the previous line. Otherwise the patch looks good. Reviewed-by: Alberto Garcia Berto