[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 11/18] hbitmap: Add @advance param
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 11/18] hbitmap: Add @advance param to hbitmap_iter_next() |
Date: |
Mon, 25 Sep 2017 22:40:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 2017-09-25 17:38, Vladimir Sementsov-Ogievskiy wrote:
> 13.09.2017 21:19, Max Reitz wrote:
>> This new parameter allows the caller to just query the next dirty
>> position without moving the iterator.
>>
>> Signed-off-by: Max Reitz <address@hidden>
>> ---
>> include/qemu/hbitmap.h | 4 +++-
>> block/dirty-bitmap.c | 2 +-
>> tests/test-hbitmap.c | 26 +++++++++++++-------------
>> util/hbitmap.c | 10 +++++++---
>> 4 files changed, 24 insertions(+), 18 deletions(-)
>>
>> diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h
>> index d3a74a21fc..6a52575ad5 100644
>> --- a/include/qemu/hbitmap.h
>> +++ b/include/qemu/hbitmap.h
>> @@ -316,11 +316,13 @@ void hbitmap_free_meta(HBitmap *hb);
>> /**
>> * hbitmap_iter_next:
>> * @hbi: HBitmapIter to operate on.
>> + * @advance: If true, advance the iterator. Otherwise, the next call
>> + * of this function will return the same result.
>
> it's not quit right, as hbitmap iterator allows concurrent resetting of
> bits, and in
> this case next call may return some other result. (see f63ea4e92bad1db)
Ah, right! I think it should still be useful for what I (currently)
need in patch 12, I would just need a different description then.
(Like "...will return the same result (if that position is still dirty).")
Max
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH 05/18] block/mirror: Convert to coroutines, (continued)
- [Qemu-block] [PATCH 05/18] block/mirror: Convert to coroutines, Max Reitz, 2017/09/13
- [Qemu-block] [PATCH 06/18] block/mirror: Use CoQueue to wait on in-flight ops, Max Reitz, 2017/09/13
- [Qemu-block] [PATCH 07/18] block/mirror: Wait for in-flight op conflicts, Max Reitz, 2017/09/13
- [Qemu-block] [PATCH 08/18] block/mirror: Use source as a BdrvChild, Max Reitz, 2017/09/13
- [Qemu-block] [PATCH 09/18] block: Generalize should_update_child() rule, Max Reitz, 2017/09/13
- [Qemu-block] [PATCH 10/18] block/mirror: Make source the file child, Max Reitz, 2017/09/13
- [Qemu-block] [PATCH 11/18] hbitmap: Add @advance param to hbitmap_iter_next(), Max Reitz, 2017/09/13
- [Qemu-block] [PATCH 12/18] block/dirty-bitmap: Add bdrv_dirty_iter_next_area, Max Reitz, 2017/09/13
- [Qemu-block] [PATCH 13/18] block/mirror: Keep write perm for pending writes, Max Reitz, 2017/09/13
- [Qemu-block] [PATCH 14/18] block/mirror: Distinguish active from passive ops, Max Reitz, 2017/09/13
- [Qemu-block] [PATCH 15/18] block/mirror: Add active mirroring, Max Reitz, 2017/09/13