On 09/26/2013 05:55 AM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <f...@redhat.com>
> ---
>  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 <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to