[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v3 03/13] block: Freeze the backing chain for the du
From: |
Alberto Garcia |
Subject: |
[Qemu-block] [PATCH v3 03/13] block: Freeze the backing chain for the duration of the mirror job |
Date: |
Tue, 12 Mar 2019 18:48:42 +0200 |
Signed-off-by: Alberto Garcia <address@hidden>
---
block/mirror.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/block/mirror.c b/block/mirror.c
index 726d3c27fb..010fdafd79 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -630,6 +630,10 @@ static int mirror_exit_common(Job *job)
}
s->prepared = true;
+ if (bdrv_chain_contains(src, target_bs)) {
+ bdrv_unfreeze_backing_chain(mirror_top_bs, target_bs);
+ }
+
bdrv_release_dirty_bitmap(src, s->dirty_bitmap);
/* Make sure that the source BDS doesn't go away during bdrv_replace_node,
@@ -1639,6 +1643,10 @@ static void mirror_start_job(const char *job_id,
BlockDriverState *bs,
goto fail;
}
}
+
+ if (bdrv_freeze_backing_chain(mirror_top_bs, target, errp) < 0) {
+ goto fail;
+ }
}
QTAILQ_INIT(&s->ops_in_flight);
--
2.11.0
- [Qemu-block] [PATCH v3 00/13] Add a 'x-blockdev-reopen' QMP command, Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 07/13] block: Allow omitting the 'backing' option in certain cases, Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 09/13] block: Add a 'mutable_opts' field to BlockDriver, Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 02/13] block: Freeze the backing chain for the duration of the commit job, Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 11/13] block: Remove the AioContext parameter from bdrv_reopen_multiple(), Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 01/13] block: Allow freezing BdrvChild links, Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 08/13] block: Allow changing the backing file on reopen, Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 03/13] block: Freeze the backing chain for the duration of the mirror job,
Alberto Garcia <=
- [Qemu-block] [PATCH v3 05/13] block: Add 'keep_old_opts' parameter to bdrv_reopen_queue(), Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 04/13] block: Freeze the backing chain for the duration of the stream job, Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 13/13] qemu-iotests: Test the x-blockdev-reopen QMP command, Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 10/13] block: Add bdrv_reset_options_allowed(), Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 12/13] block: Add an 'x-blockdev-reopen' QMP command, Alberto Garcia, 2019/03/12
- [Qemu-block] [PATCH v3 06/13] block: Handle child references in bdrv_reopen_queue(), Alberto Garcia, 2019/03/12
- Re: [Qemu-block] [PATCH v3 00/13] Add a 'x-blockdev-reopen' QMP command, Alberto Garcia, 2019/03/12