aboutsummaryrefslogtreecommitdiff
path: root/block/commit.c
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2016-07-05 17:29:00 +0300
committerKevin Wolf <kwolf@redhat.com>2016-07-13 13:26:02 +0200
commitfd62c609edb32ddaafbe84c466dd21603577a46d (patch)
tree09bd3fa71464705b3852a2f61166345302fec6ed /block/commit.c
parent2323322ed060749b52864836f6fcb1a906baf95d (diff)
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 'block/commit.c')
-rw-r--r--block/commit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/block/commit.c b/block/commit.c
index 137bb03297..23368fa65b 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -211,8 +211,8 @@ static const BlockJobDriver commit_job_driver = {
.set_speed = commit_set_speed,
};
-void commit_start(BlockDriverState *bs, BlockDriverState *base,
- BlockDriverState *top, int64_t speed,
+void commit_start(const char *job_id, BlockDriverState *bs,
+ BlockDriverState *base, BlockDriverState *top, int64_t speed,
BlockdevOnError on_error, BlockCompletionFunc *cb,
void *opaque, const char *backing_file_str, Error **errp)
{
@@ -236,7 +236,8 @@ void commit_start(BlockDriverState *bs, BlockDriverState *base,
return;
}
- s = block_job_create(NULL, &commit_job_driver, bs, speed, cb, opaque, errp);
+ s = block_job_create(job_id, &commit_job_driver, bs, speed,
+ cb, opaque, errp);
if (!s) {
return;
}