From 5360782d0827854383097d560715d8d8027ee590 Mon Sep 17 00:00:00 2001 From: John Snow Date: Thu, 6 Sep 2018 09:02:10 -0400 Subject: block/commit: add block job creation flags Add support for taking and passing forward job creation flags. Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Jeff Cody Message-id: 20180906130225.5118-2-jsnow@redhat.com Signed-off-by: Max Reitz --- blockdev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'blockdev.c') diff --git a/blockdev.c b/blockdev.c index 72f5347df5..c15a1e624b 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3214,6 +3214,7 @@ void qmp_block_commit(bool has_job_id, const char *job_id, const char *device, * BlockdevOnError change for blkmirror makes it in */ BlockdevOnError on_error = BLOCKDEV_ON_ERROR_REPORT; + int job_flags = JOB_DEFAULT; if (!has_speed) { speed = 0; @@ -3295,15 +3296,15 @@ void qmp_block_commit(bool has_job_id, const char *job_id, const char *device, goto out; } commit_active_start(has_job_id ? job_id : NULL, bs, base_bs, - JOB_DEFAULT, speed, on_error, + job_flags, speed, on_error, filter_node_name, NULL, NULL, false, &local_err); } else { BlockDriverState *overlay_bs = bdrv_find_overlay(bs, top_bs); if (bdrv_op_is_blocked(overlay_bs, BLOCK_OP_TYPE_COMMIT_TARGET, errp)) { goto out; } - commit_start(has_job_id ? job_id : NULL, bs, base_bs, top_bs, speed, - on_error, has_backing_file ? backing_file : NULL, + commit_start(has_job_id ? job_id : NULL, bs, base_bs, top_bs, job_flags, + speed, on_error, has_backing_file ? backing_file : NULL, filter_node_name, &local_err); } if (local_err != NULL) { -- cgit v1.2.3