[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 16/17] block: protect modification
Re: [Qemu-block] [Qemu-devel] [PATCH 16/17] block: protect modification of dirty bitmaps with a mutex
Thu, 4 May 2017 12:05:23 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 04/05/2017 10:05, Fam Zheng wrote:
>> /* Writing to the list requires the BQL _and_ the dirty_bitmap_mutex.
>> * Reading from the list can be done with either the BQL or the
>> - * dirty_bitmap_mutex. Modifying a bitmap requires the AioContext
>> - * lock. */
>> + * dirty_bitmap_mutex. Modifying a bitmap only requires
>> + * dirty_bitmap_mutex. */
> I'm confused by this comment. What's added in this patch is bitmap->mutex, not
> dirty_bitmap_mutex. Is it a mistake?
bitmap->mutex is a pointer that points to the (single) per-BDS mutex.
This patch changes the modification of bitmaps to require bitmap->mutex
(which points to bs->dirty_bitmap_mutex) instead of the AioContext lock.
>> QemuMutex dirty_bitmap_mutex;