[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard
Date: Mon, 11 May 2015 10:33:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 11/05/2015 10:02, Fam Zheng wrote:
>       /*
>        * ...
>        *
>        * 'pnum' is set to the number of sectors (including and immediately 
> following
>        * the specified sector) that are known to be in the same
>        * allocated/unallocated state.
>        *
>        * 'nb_sectors' is the max value 'pnum' should be set to.  If 
> nb_sectors goes
>        * beyond the end of the disk image it will be clamped.
>        */
>       static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState 
> *bs,
> So we currently don't coalesce the sequential dirty sectors.
> Was that intentional?

The idea, I think, is that for some drivers bdrv_co_get_block_status is

It's okay to let a driver return *pnum > nb_sectors.  You do need to
audit the callers, though.  It would be nice also to add TODOs whenever
the code is fine but it could explot *pnum > nb_sectors to get better


reply via email to

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