[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
O(nb_sectors).
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
performance.
Paolo
- [Qemu-devel] [PATCH 0/4] block: Mirror discarded sectors, Fam Zheng, 2015/05/05
- [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard, Fam Zheng, 2015/05/05
- Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard, Paolo Bonzini, 2015/05/05
- Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard, Fam Zheng, 2015/05/05
- Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard, Paolo Bonzini, 2015/05/06
- Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard, Fam Zheng, 2015/05/06
- Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard, Paolo Bonzini, 2015/05/06
- Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard, Fam Zheng, 2015/05/11
- Re: [Qemu-devel] [PATCH 1/4] block: Fix dirty bitmap in bdrv_co_discard,
Paolo Bonzini <=
[Qemu-devel] [PATCH 2/4] block: Remove bdrv_reset_dirty, Fam Zheng, 2015/05/05
[Qemu-devel] [PATCH 3/4] qemu-iotests: Make block job methods common, Fam Zheng, 2015/05/05
[Qemu-devel] [PATCH 4/4] qemu-iotests: Add test case for mirror with unmap, Fam Zheng, 2015/05/05