Skip to contentSkip to conversation

block: Make BlockJobTypes const

PATCH In review Kevin Wolf 2 participants 2 messages Jun 25, 2013 – Jun 27, 2013 Block layer

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 block: Make BlockJobTypes const

---
 block/commit.c | 2 +-
 block/mirror.c | 2 +-
 block/stream.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
block/commit.c +1 -1
index 553447e..2227fc2 100644
@@ -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,
block/mirror.c +1 -1
index 1ae724f..bed4a7e 100644
@@ -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,
block/stream.c +1 -1
index d6df06f..7fe9e48 100644
@@ -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,
Signature · 1 line
1.8.1.4