diff options
author | Alberto Garcia <berto@igalia.com> | 2016-07-05 17:29:00 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-07-13 13:26:02 +0200 |
commit | fd62c609edb32ddaafbe84c466dd21603577a46d (patch) | |
tree | 09bd3fa71464705b3852a2f61166345302fec6ed /blockdev.c | |
parent | 2323322ed060749b52864836f6fcb1a906baf95d (diff) | |
download | qemu-fd62c609edb32ddaafbe84c466dd21603577a46d.zip qemu-fd62c609edb32ddaafbe84c466dd21603577a46d.tar.gz qemu-fd62c609edb32ddaafbe84c466dd21603577a46d.tar.bz2 |
commit: Add 'job-id' parameter to 'block-commit'
This patch adds a new optional 'job-id' parameter to 'block-commit',
allowing the user to specify the ID of the block job to be created.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -3077,7 +3077,7 @@ out: aio_context_release(aio_context); } -void qmp_block_commit(const char *device, +void qmp_block_commit(bool has_job_id, const char *job_id, const char *device, bool has_base, const char *base, bool has_top, const char *top, bool has_backing_file, const char *backing_file, @@ -3168,10 +3168,11 @@ void qmp_block_commit(const char *device, " but 'top' is the active layer"); goto out; } - commit_active_start(bs, base_bs, speed, on_error, block_job_cb, - bs, &local_err); + commit_active_start(has_job_id ? job_id : NULL, bs, base_bs, speed, + on_error, block_job_cb, bs, &local_err); } else { - commit_start(bs, base_bs, top_bs, speed, on_error, block_job_cb, bs, + commit_start(has_job_id ? job_id : NULL, bs, base_bs, top_bs, speed, + on_error, block_job_cb, bs, has_backing_file ? backing_file : NULL, &local_err); } if (local_err != NULL) { |