diff options
| author | Paolo Bonzini | 2017-06-05 14:39:03 +0200 |
|---|---|---|
| committer | Fam Zheng | 2017-06-16 01:55:00 +0200 |
| commit | 2119882c7eb7e2c612b24fc0c8d86f5887d6f1c3 (patch) | |
| tree | 2c41a8155a0b8f1746f654fe374546d4e6860f5e /include/block | |
| parent | block: protect tracked_requests and flush_queue with reqs_lock (diff) | |
| download | qemu-2119882c7eb7e2c612b24fc0c8d86f5887d6f1c3.tar.gz qemu-2119882c7eb7e2c612b24fc0c8d86f5887d6f1c3.tar.xz qemu-2119882c7eb7e2c612b24fc0c8d86f5887d6f1c3.zip | |
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>
Diffstat (limited to 'include/block')
| -rw-r--r-- | include/block/block_int.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index ae74df97ec..21cb65bd60 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -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 */ |
