aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block/mirror.c3
-rw-r--r--blockjob.c3
-rw-r--r--include/block/blockjob.h5
-rw-r--r--include/qapi/qmp/qerror.h3
4 files changed, 5 insertions, 9 deletions
diff --git a/block/mirror.c b/block/mirror.c
index 8d96049555..6e3dbd257b 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -761,7 +761,8 @@ static void mirror_complete(BlockJob *job, Error **errp)
target = blk_bs(s->target);
if (!s->synced) {
- error_setg(errp, QERR_BLOCK_JOB_NOT_READY, job->id);
+ error_setg(errp, "The active block job '%s' cannot be completed",
+ job->id);
return;
}
diff --git a/blockjob.c b/blockjob.c
index 205da9df4e..ce0e27c124 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -290,7 +290,8 @@ void block_job_set_speed(BlockJob *job, int64_t speed, Error **errp)
void block_job_complete(BlockJob *job, Error **errp)
{
if (job->pause_count || job->cancelled || !job->driver->complete) {
- error_setg(errp, QERR_BLOCK_JOB_NOT_READY, job->id);
+ error_setg(errp, "The active block job '%s' cannot be completed",
+ job->id);
return;
}
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index f7f5687cf4..97b86f109f 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -107,10 +107,7 @@ struct BlockJob {
BlockBackend *blk;
/**
- * The ID of the block job. Currently the BlockBackend name of the BDS
- * owning the job at the time when the job is started.
- *
- * TODO Decouple block job IDs from BlockBackend names
+ * The ID of the block job.
*/
char *id;
diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h
index d08652aaa5..6586c9fa62 100644
--- a/include/qapi/qmp/qerror.h
+++ b/include/qapi/qmp/qerror.h
@@ -19,9 +19,6 @@
#define QERR_BASE_NOT_FOUND \
"Base '%s' not found"
-#define QERR_BLOCK_JOB_NOT_READY \
- "The active block job for device '%s' cannot be completed"
-
#define QERR_BUS_NO_HOTPLUG \
"Bus '%s' does not support hotplugging"