[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v11 04/19] block: Use block_job_add_bdrv() in mirror
From: |
Alberto Garcia |
Subject: |
[Qemu-block] [PATCH v11 04/19] block: Use block_job_add_bdrv() in mirror_start_job() |
Date: |
Fri, 14 Oct 2016 16:08:16 +0300 |
Use block_job_add_bdrv() instead of blocking all operations in
mirror_start_job() and unblocking them in mirror_exit().
Signed-off-by: Alberto Garcia <address@hidden>
---
block/mirror.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index f9d1fec..9b5159f 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -526,7 +526,6 @@ static void mirror_exit(BlockJob *job, void *opaque)
aio_context_release(replace_aio_context);
}
g_free(s->replaces);
- bdrv_op_unblock_all(target_bs, s->common.blocker);
blk_unref(s->target);
block_job_completed(&s->common, data->ret);
g_free(data);
@@ -965,7 +964,7 @@ static void mirror_start_job(const char *job_id,
BlockDriverState *bs,
return;
}
- bdrv_op_block_all(target, s->common.blocker);
+ block_job_add_bdrv(&s->common, target);
s->common.co = qemu_coroutine_create(mirror_run, s);
trace_mirror_start(bs, s, s->common.co, opaque);
--
2.9.3
- [Qemu-block] [PATCH v11 19/19] qemu-iotests: Test the 'base-node' parameter of 'block-stream', (continued)
- [Qemu-block] [PATCH v11 19/19] qemu-iotests: Test the 'base-node' parameter of 'block-stream', Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 18/19] block: Add 'base-node' parameter to the 'block-stream' command, Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 08/19] block: Block all intermediate nodes in commit_active_start(), Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 14/19] qemu-iotests: Test overlapping stream and commit operations, Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 05/19] block: Use block_job_add_bdrv() in backup_start(), Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 13/19] qemu-iotests: Test block-stream operations in parallel, Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 07/19] block: Block all nodes involved in the block-commit operation, Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 03/19] block: Add block_job_add_bdrv(), Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 06/19] block: Check blockers in all nodes involved in a block-commit job, Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 16/19] qemu-iotests: Add iotests.supports_quorum(), Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 04/19] block: Use block_job_add_bdrv() in mirror_start_job(),
Alberto Garcia <=
- [Qemu-block] [PATCH v11 11/19] docs: Document how to stream to an intermediate layer, Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 10/19] block: Add QMP support for streaming to an intermediate layer, Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 15/19] qemu-iotests: Test block-stream and block-commit in parallel, Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 09/19] block: Support streaming to an intermediate layer, Alberto Garcia, 2016/10/14
- [Qemu-block] [PATCH v11 17/19] qemu-iotests: Test streaming to a Quorum child, Alberto Garcia, 2016/10/14