On 27/06/2017 17:32, Vladimir Sementsov-Ogievskiy wrote:
>>>>
>>>>
>>>> - we protect inserting into list from other threads, but what prevent
>>>> creating bitmap with the same name from other thread after
>>>> bdrv_find_dirty_bitmap() and before bdrv_dirty_bitmaps_lock() ?
>>> It's like a read-write lock.
>>
>> Ok, finally I understand (not all, but the main idea=), sorry for
>> annoying.
> 
> Is there any example of accessing dirty bitmaps for read not under BQL
> but only under dirty bitmap lock?

Yes, search for bdrv_dirty_bitmap_lock...unlock in block/mirror.c.
There is also block/backup.c, which operates on a frozen bitmap.

Paolo

Reply via email to