mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 05:43:53 -06:00
block: Make BlockJobTypes const
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
e5ca8fdd40
commit
f59fee8d50
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
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),
|
.instance_size = sizeof(CommitBlockJob),
|
||||||
.job_type = "commit",
|
.job_type = "commit",
|
||||||
.set_speed = commit_set_speed,
|
.set_speed = commit_set_speed,
|
||||||
|
|
|
@ -524,7 +524,7 @@ static void mirror_complete(BlockJob *job, Error **errp)
|
||||||
block_job_resume(job);
|
block_job_resume(job);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BlockJobType mirror_job_type = {
|
static const BlockJobType mirror_job_type = {
|
||||||
.instance_size = sizeof(MirrorBlockJob),
|
.instance_size = sizeof(MirrorBlockJob),
|
||||||
.job_type = "mirror",
|
.job_type = "mirror",
|
||||||
.set_speed = mirror_set_speed,
|
.set_speed = mirror_set_speed,
|
||||||
|
|
|
@ -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);
|
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),
|
.instance_size = sizeof(StreamBlockJob),
|
||||||
.job_type = "stream",
|
.job_type = "stream",
|
||||||
.set_speed = stream_set_speed,
|
.set_speed = stream_set_speed,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue