From 7bd51b7f1ea911e7a85f1965495c4299701b5f7c Mon Sep 17 00:00:00 2001
From: Fam Zheng <famz@redhat.com>
Date: Fri, 17 Jan 2014 03:07:53 +0100
Subject: [PATCH 10/34] block: Make BlockJobTypes const
RH-Author: Fam Zheng <famz@redhat.com>
Message-id: <1389928083-8921-9-git-send-email-famz@redhat.com>
Patchwork-id: 56770
O-Subject: [RHEL-7 qemu-kvm PATCH 08/18] block: Make BlockJobTypes const
Bugzilla: 1041301
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
From: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit f59fee8d509b446df24843c1145a99b740492725)
Signed-off-by: Fam Zheng <famz@redhat.com>
---
block/commit.c | 2 +-
block/mirror.c | 2 +-
block/stream.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
block/commit.c | 2 +-
block/mirror.c | 2 +-
block/stream.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index 74c209a..37572f0 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -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,
diff --git a/block/mirror.c b/block/mirror.c
index 6843e70..342c90d 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -525,7 +525,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,
diff --git a/block/stream.c b/block/stream.c
index 82fb179..ce16b0b 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -204,7 +204,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,
--
1.7.1