Commit f59fee8d authored by Kevin Wolf's avatar Kevin Wolf
Browse files

block: Make BlockJobTypes const



Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent e5ca8fdd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ static void commit_set_speed(BlockJob *job, int64_t speed, Error **errp)
    ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE, SLICE_TIME);
}

static BlockJobType commit_job_type = {
static const BlockJobType commit_job_type = {
    .instance_size = sizeof(CommitBlockJob),
    .job_type      = "commit",
    .set_speed     = commit_set_speed,
+1 −1
Original line number Diff line number Diff line
@@ -524,7 +524,7 @@ static void mirror_complete(BlockJob *job, Error **errp)
    block_job_resume(job);
}

static BlockJobType mirror_job_type = {
static const BlockJobType mirror_job_type = {
    .instance_size = sizeof(MirrorBlockJob),
    .job_type      = "mirror",
    .set_speed     = mirror_set_speed,
+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ static void stream_set_speed(BlockJob *job, int64_t speed, Error **errp)
    ratelimit_set_speed(&s->limit, speed / BDRV_SECTOR_SIZE, SLICE_TIME);
}

static BlockJobType stream_job_type = {
static const BlockJobType stream_job_type = {
    .instance_size = sizeof(StreamBlockJob),
    .job_type      = "stream",
    .set_speed     = stream_set_speed,