[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block: use DIV_ROUND_UP in bdrv_co_do_readv
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] block: use DIV_ROUND_UP in bdrv_co_do_readv |
Date: |
Thu, 26 Sep 2013 06:05:45 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
On 09/26/2013 05:55 AM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> 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 <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature