Received: from eggs.gnu.org ([2001:4830:134:3::10]:39685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5Ziq-0004f6-Lv for qemu-devel@nongnu.org; Wed, 25 May 2016 10:23:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5Zil-0003Ts-FP for qemu-devel@nongnu.org; Wed, 25 May 2016 10:23:44 -0400 Date: Wed, 25 May 2016 16:23:27 +0200 From: Kevin Wolf Message-ID: <20160525142327.GO4815@noname.redhat.com> References: <1464128732-12667-1-git-send-email-eblake@redhat.com> <1464128732-12667-13-git-send-email-eblake@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464128732-12667-13-git-send-email-eblake@redhat.com> Subject: Re: [Qemu-devel] [PATCH 12/13] vmdk: Convert to bdrv_co_pwrite_zeroes() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Fam Zheng , Max Reitz Am 25.05.2016 um 00:25 hat Eric Blake geschrieben: > Another step on our continuing quest to switch to byte-based > interfaces. > > Signed-off-by: Eric Blake > --- > block/vmdk.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/block/vmdk.c b/block/vmdk.c > index 8494d63..284d7a0 100644 > --- a/block/vmdk.c > +++ b/block/vmdk.c > @@ -1704,15 +1704,14 @@ static int vmdk_write_compressed(BlockDriverState *bs, > } > } > > -static int coroutine_fn vmdk_co_write_zeroes(BlockDriverState *bs, > - int64_t sector_num, > - int nb_sectors, > - BdrvRequestFlags flags) > +static int coroutine_fn vmdk_co_pwrite_zeroes(BlockDriverState *bs, > + int64_t offset, > + int count, > + BdrvRequestFlags flags) > { > int ret; > BDRVVmdkState *s = bs->opaque; > - uint64_t offset = sector_num * BDRV_SECTOR_SIZE; > - uint64_t bytes = nb_sectors * BDRV_SECTOR_SIZE; > + uint64_t bytes = count; That's an unnecessary variable again. Whether you decide to change it or not: Reviewed-by: Kevin Wolf