mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
blockjob: introduce block-job-change QMP command
which will allow changing job-type-specific options after job creation. In the JobVerbTable, the same allow bits as for set-speed are used, because set-speed can be considered an existing change command. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-ID: <20231031135431.393137-2-f.ebner@proxmox.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
073458da56
commit
61a3a5a76a
7 changed files with 82 additions and 1 deletions
14
blockdev.c
14
blockdev.c
|
@ -3392,6 +3392,20 @@ void qmp_block_job_dismiss(const char *id, Error **errp)
|
|||
job_dismiss_locked(&job, errp);
|
||||
}
|
||||
|
||||
void qmp_block_job_change(BlockJobChangeOptions *opts, Error **errp)
|
||||
{
|
||||
BlockJob *job;
|
||||
|
||||
JOB_LOCK_GUARD();
|
||||
job = find_block_job_locked(opts->id, errp);
|
||||
|
||||
if (!job) {
|
||||
return;
|
||||
}
|
||||
|
||||
block_job_change_locked(job, opts, errp);
|
||||
}
|
||||
|
||||
void qmp_change_backing_file(const char *device,
|
||||
const char *image_node_name,
|
||||
const char *backing_file,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue