qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 03/19] cow: do not call bdrv_co_is_allocated


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v3 03/19] cow: do not call bdrv_co_is_allocated
Date: Mon, 29 Jul 2013 15:22:01 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 25.07.2013 um 16:23 hat Paolo Bonzini geschrieben:
> As we change bdrv_is_allocated to gather more information from bs and
> bs->file, it will become a bit slower.  It is still appropriate for online
> jobs, but not for reads/writes.  Call the internal function instead.
> 
> Reviewed-by: Eric Blake <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  block/cow.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/block/cow.c b/block/cow.c
> index 9ae2d6a..9797f71 100644
> --- a/block/cow.c
> +++ b/block/cow.c
> @@ -46,6 +46,9 @@ typedef struct BDRVCowState {
>      int64_t cow_sectors_offset;
>  } BDRVCowState;
>  
> +static int coroutine_fn cow_co_is_allocated(BlockDriverState *bs,
> +        int64_t sector_num, int nb_sectors, int *num_same);

This forward declaration seems unnecessary.

Kevin



reply via email to

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