[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/11] replication: Remove workaround
From: |
Kevin Wolf |
Subject: |
[PULL 08/11] replication: Remove workaround |
Date: |
Tue, 20 Jul 2021 17:10:50 +0200 |
From: Lukas Straub <lukasstraub2@web.de>
Remove the workaround introduced in commit
6ecbc6c52672db5c13805735ca02784879ce8285
"replication: Avoid blk_make_empty() on read-only child".
It is not needed anymore since s->hidden_disk is guaranteed to be
writable when secondary_do_checkpoint() runs. Because replication_start(),
_do_checkpoint() and _stop() are only called by COLO migration code
and COLO-migration activates all disks via bdrv_invalidate_cache_all()
before it calls these functions.
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id:
<d3acfad43879e9f376bffa7dd797ae74d0a7c81a.1626619393.git.lukasstraub2@web.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/replication.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/block/replication.c b/block/replication.c
index b74192f795..32444b9a8f 100644
--- a/block/replication.c
+++ b/block/replication.c
@@ -346,17 +346,7 @@ static void secondary_do_checkpoint(BlockDriverState *bs,
Error **errp)
return;
}
- BlockBackend *blk = blk_new(qemu_get_current_aio_context(),
- BLK_PERM_WRITE, BLK_PERM_ALL);
- blk_insert_bs(blk, s->hidden_disk->bs, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- blk_unref(blk);
- return;
- }
-
- ret = blk_make_empty(blk, errp);
- blk_unref(blk);
+ ret = bdrv_make_empty(s->hidden_disk, errp);
if (ret < 0) {
return;
}
--
2.31.1
- [PULL 00/11] Block layer patches, Kevin Wolf, 2021/07/20
- [PULL 01/11] block/mirror: set .co for active-write MirrorOp objects, Kevin Wolf, 2021/07/20
- [PULL 02/11] iotest 151: add test-case that shows active mirror dead-lock, Kevin Wolf, 2021/07/20
- [PULL 03/11] block/mirror: fix active mirror dead-lock in mirror_wait_on_conflicts, Kevin Wolf, 2021/07/20
- [PULL 04/11] block: Add option to use driver whitelist even in tools, Kevin Wolf, 2021/07/20
- [PULL 05/11] replication: Remove s->active_disk, Kevin Wolf, 2021/07/20
- [PULL 06/11] replication: Reduce usage of s->hidden_disk and s->secondary_disk, Kevin Wolf, 2021/07/20
- [PULL 07/11] replication: Properly attach children, Kevin Wolf, 2021/07/20
- [PULL 08/11] replication: Remove workaround,
Kevin Wolf <=
- [PULL 09/11] block/vvfat: fix: drop backing, Kevin Wolf, 2021/07/20
- [PULL 11/11] iotests/307: Test iothread conflict for exports, Kevin Wolf, 2021/07/20
- [PULL 10/11] block/export: Conditionally ignore set-context error, Kevin Wolf, 2021/07/20
- Re: [PULL 00/11] Block layer patches, Peter Maydell, 2021/07/20