mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
block: introduce dirty_bitmap_mutex
It protects only the list of dirty bitmaps; in the next patch we will also protect their content. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20170605123908.18777-15-pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
This commit is contained in:
parent
3783fa3dd3
commit
2119882c7e
6 changed files with 58 additions and 45 deletions
|
@ -609,6 +609,11 @@ struct BlockDriverState {
|
|||
uint64_t write_threshold_offset;
|
||||
NotifierWithReturn write_threshold_notifier;
|
||||
|
||||
/* 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. */
|
||||
QemuMutex dirty_bitmap_mutex;
|
||||
QLIST_HEAD(, BdrvDirtyBitmap) dirty_bitmaps;
|
||||
|
||||
/* Offset after the highest byte written to */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue