qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 01/17] cow: make reads go at a decent speed


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 01/17] cow: make reads go at a decent speed
Date: Fri, 5 Jul 2013 11:09:10 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jul 03, 2013 at 04:34:15PM +0200, Paolo Bonzini wrote:
> @@ -146,23 +159,20 @@ static inline int is_bit_set(BlockDriverState *bs, 
> int64_t bitnum)
>  static int coroutine_fn cow_co_is_allocated(BlockDriverState *bs,
>          int64_t sector_num, int nb_sectors, int *num_same)
>  {
> +    int64_t bitnum = sector_num + sizeof(struct cow_header_v2) * 8;
> +    uint64_t offset = (bitnum / 8) & -BDRV_SECTOR_SIZE;
> +    uint8_t bitmap[512];

Please use BDRV_SECTOR_SIZE, you used it one line above but then
switched to literal 512.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]