Commit 9df229c3 authored by Alberto Garcia's avatar Alberto Garcia Committed by Kevin Wolf
Browse files

blockjob: Update description of the 'id' field



The 'id' field of the BlockJob structure will be able to hold any ID,
not only a device name. This patch updates the description of that
field and the error messages where it is being used.

Soon we'll add the ability to set an arbitrary ID when creating a
block job.

Signed-off-by: default avatarAlberto Garcia <berto@igalia.com>
Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 29338003
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
    }

+2 −1
Original line number Diff line number Diff line
@@ -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;
    }

+1 −4
Original line number Diff line number Diff line
@@ -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;

+0 −3
Original line number Diff line number Diff line
@@ -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"