[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 18/28] block: Freeze the backing chain for the durati
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 18/28] block: Freeze the backing chain for the duration of the mirror job |
Date: |
Tue, 12 Mar 2019 18:30:15 +0100 |
From: Alberto Garcia <address@hidden>
Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <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.20.1
- [Qemu-block] [PULL 10/28] file-posix: Factor out raw_reconfigure_getfd(), (continued)
- [Qemu-block] [PULL 10/28] file-posix: Factor out raw_reconfigure_getfd(), Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 14/28] file-posix: Make auto-read-only dynamic, Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 15/28] nvme: fix write zeroes offset and count, Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 08/28] block: Make permission changes in reopen less wrong, Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 12/28] file-posix: Lock new fd in raw_reopen_prepare(), Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 13/28] file-posix: Prepare permission code for fd switching, Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 16/28] block: Allow freezing BdrvChild links, Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 17/28] block: Freeze the backing chain for the duration of the commit job, Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 18/28] block: Freeze the backing chain for the duration of the mirror job,
Kevin Wolf <=
- [Qemu-block] [PULL 19/28] block: Freeze the backing chain for the duration of the stream job, Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 20/28] block: Add 'keep_old_opts' parameter to bdrv_reopen_queue(), Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 22/28] block: Allow omitting the 'backing' option in certain cases, Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 21/28] block: Handle child references in bdrv_reopen_queue(), Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 24/28] block: Add a 'mutable_opts' field to BlockDriver, Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 23/28] block: Allow changing the backing file on reopen, Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 26/28] block: Remove the AioContext parameter from bdrv_reopen_multiple(), Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 27/28] block: Add an 'x-blockdev-reopen' QMP command, Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 25/28] block: Add bdrv_reset_options_allowed(), Kevin Wolf, 2019/03/12
- [Qemu-block] [PULL 28/28] qemu-iotests: Test the x-blockdev-reopen QMP command, Kevin Wolf, 2019/03/12