diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-05-30 12:10:27 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-05-30 12:10:27 +0100 |
commit | 62f6849e7a74fe34f5e376fe41389298100a2d1e (patch) | |
tree | f48c4c7a51a2e03df7ae4e0f32adf36b770f3497 /block | |
parent | e5714b5be3d63d880844f004bd3c76170a280069 (diff) | |
parent | 403bb8185ec18267fe47a0e304d26a17263572dc (diff) | |
download | qemu-62f6849e7a74fe34f5e376fe41389298100a2d1e.zip |
Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging
Pull request
# gpg: Signature made Wed 29 May 2019 00:58:33 BST
# gpg: using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full]
# Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB
# Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E
* remotes/jnsnow/tags/bitmaps-pull-request:
iotests: test external snapshot with bitmap copying
qapi: support external bitmaps in block-dirty-bitmap-merge
migration/dirty-bitmaps: change bitmap enumeration method
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/dirty-bitmap.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 59e6ebb861..49646a30e6 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -816,10 +816,10 @@ void bdrv_merge_dirty_bitmap(BdrvDirtyBitmap *dest, const BdrvDirtyBitmap *src, { bool ret; - /* only bitmaps from one bds are supported */ - assert(dest->mutex == src->mutex); - qemu_mutex_lock(dest->mutex); + if (src->mutex != dest->mutex) { + qemu_mutex_lock(src->mutex); + } if (bdrv_dirty_bitmap_check(dest, BDRV_BITMAP_DEFAULT, errp)) { goto out; @@ -845,4 +845,7 @@ void bdrv_merge_dirty_bitmap(BdrvDirtyBitmap *dest, const BdrvDirtyBitmap *src, out: qemu_mutex_unlock(dest->mutex); + if (src->mutex != dest->mutex) { + qemu_mutex_unlock(src->mutex); + } } |