diff --git a/block/mirror.c b/block/mirror.c index 8d96049555fc2d927a005bb398d006cfdc76013a..6e3dbd257bc4e1d357d557c825e5793c78078641 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 205da9df4e03d0341312bbb77d73f447e8076b50..ce0e27c124b5d70cd5a5de8f6e7cc1a230c70202 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 f7f5687cf404a2673946c2b1317c99f7b9a7544c..97b86f109f3a777df6f1a68060a5ff01a5258968 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 d08652aaa5cb0e0551290dc36226bdbe6a6512b3..6586c9fa62ff887594dd5c87de4fed19152b5aa6 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"