We are going to move change action from block-job to job
implementation, and then move to job-* extenral APIs, deprecating
block-job-* APIs. This commit simplifies further transition.
The commit is made by command
git grep -l BlockJobChangeOptions | \
xargs sed -i 's/BlockJobChangeOptions/JobChangeOptions/g'
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Acked-by: Markus Armbruster <armbru@redhat.com>
---
block/mirror.c | 4 ++--
blockdev.c | 2 +-
blockjob.c | 2 +-
include/block/blockjob.h | 2 +-
include/block/blockjob_int.h | 2 +-
qapi/block-core.json | 12 ++++++------
6 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index 61f0a717b7..2816bb1042 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -1258,11 +1258,11 @@ static bool commit_active_cancel(Job *job, bool force)
return force || !job_is_ready(job);
}
-static void mirror_change(BlockJob *job, BlockJobChangeOptions *opts,
+static void mirror_change(BlockJob *job, JobChangeOptions *opts,
Error **errp)
{
MirrorBlockJob *s = container_of(job, MirrorBlockJob, common);
- BlockJobChangeOptionsMirror *change_opts = &opts->u.mirror;
+ JobChangeOptionsMirror *change_opts = &opts->u.mirror;
MirrorCopyMode current;
/*
diff --git a/blockdev.c b/blockdev.c
index 6740663fda..626f53102d 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3251,7 +3251,7 @@ void qmp_block_job_dismiss(const char *id, Error **errp)
job_dismiss_locked(&job, errp);
}
-void qmp_block_job_change(BlockJobChangeOptions *opts, Error **errp)
+void qmp_block_job_change(JobChangeOptions *opts, Error **errp)
{
BlockJob *job;
diff --git a/blockjob.c b/blockjob.c
index d5f29e14af..8cfbb15543 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -312,7 +312,7 @@ static bool block_job_set_speed(BlockJob *job, int64_t speed, Error **errp)
return block_job_set_speed_locked(job, speed, errp);
}
-void block_job_change_locked(BlockJob *job, BlockJobChangeOptions *opts,
+void block_job_change_locked(BlockJob *job, JobChangeOptions *opts,
Error **errp)
{
const BlockJobDriver *drv = block_job_driver(job);
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index 7061ab7201..5dd1b08909 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -181,7 +181,7 @@ bool block_job_set_speed_locked(BlockJob *job, int64_t speed, Error **errp);
*
* Change the job according to opts.
*/
-void block_job_change_locked(BlockJob *job, BlockJobChangeOptions *opts,
+void block_job_change_locked(BlockJob *job, JobChangeOptions *opts,
Error **errp);
/**
diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h
index 4c3d2e25a2..d9c3b911d0 100644
--- a/include/block/blockjob_int.h
+++ b/include/block/blockjob_int.h
@@ -73,7 +73,7 @@ struct BlockJobDriver {
*
* Note that this can already be called before the job coroutine is running.
*/
- void (*change)(BlockJob *job, BlockJobChangeOptions *opts, Error **errp);
+ void (*change)(BlockJob *job, JobChangeOptions *opts, Error **errp);
/*
* Query information specific to this kind of block job.
diff --git a/qapi/block-core.json b/qapi/block-core.json
index c3b0a2376b..0156762024 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -3068,18 +3068,18 @@
'allow-preconfig': true }
##
-# @BlockJobChangeOptionsMirror:
+# @JobChangeOptionsMirror:
#
# @copy-mode: Switch to this copy mode. Currently, only the switch
# from 'background' to 'write-blocking' is implemented.
#
# Since: 8.2
##
-{ 'struct': 'BlockJobChangeOptionsMirror',
+{ 'struct': 'JobChangeOptionsMirror',
'data': { 'copy-mode' : 'MirrorCopyMode' } }
##
-# @BlockJobChangeOptions:
+# @JobChangeOptions:
#
# Block job options that can be changed after job creation.
#
@@ -3089,10 +3089,10 @@
#
# Since: 8.2
##
-{ 'union': 'BlockJobChangeOptions',
+{ 'union': 'JobChangeOptions',
'base': { 'id': 'str', 'type': 'JobType' },
'discriminator': 'type',
- 'data': { 'mirror': 'BlockJobChangeOptionsMirror' } }
+ 'data': { 'mirror': 'JobChangeOptionsMirror' } }
##
# @block-job-change:
@@ -3102,7 +3102,7 @@
# Since: 8.2
##
{ 'command': 'block-job-change',
- 'data': 'BlockJobChangeOptions', 'boxed': true }
+ 'data': 'JobChangeOptions', 'boxed': true }
##
# @BlockdevDiscardOptions:
--
2.34.1