From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPAQ4-0003JD-O5 for qemu-devel@nongnu.org; Thu, 26 Sep 2013 08:11:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPAPy-0005BO-BI for qemu-devel@nongnu.org; Thu, 26 Sep 2013 08:11:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPAPy-0005BG-3H for qemu-devel@nongnu.org; Thu, 26 Sep 2013 08:11:38 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8QCBbVj002519 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Sep 2013 08:11:37 -0400 Date: Thu, 26 Sep 2013 14:11:34 +0200 From: Kevin Wolf Message-ID: <20130926121134.GI2443@dhcp-200-207.str.redhat.com> References: <1380196533-18525-1-git-send-email-famz@redhat.com> <52442319.701@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52442319.701@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block: use DIV_ROUND_UP in bdrv_co_do_readv List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Fam Zheng , qemu-devel@nongnu.org, stefanha@redhat.com Am 26.09.2013 um 14:05 hat Eric Blake geschrieben: > On 09/26/2013 05:55 AM, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > block.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/block.c b/block.c > > index ea4956d..fe7b060 100644 > > --- a/block.c > > +++ b/block.c > > @@ -2669,7 +2669,7 @@ static int coroutine_fn bdrv_co_do_readv(BlockDriverState *bs, > > goto out; > > } > > > > - total_sectors = (len + BDRV_SECTOR_SIZE - 1) >> BDRV_SECTOR_BITS; > > + total_sectors = DIV_ROUND_UP(len, BDRV_SECTOR_SIZE); > > Reviewed-by: Eric Blake Thanks, applied to the block branch. Kevin