|
|
9ae3a8 |
From bb8aca64535578520c4b7f5186f9ae5754626694 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Jeffrey Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
Date: Thu, 5 May 2016 19:46:28 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 10/10] block jobs: qemu-kvm-rhel differentiation
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Jeffrey Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
Message-id: <f2ce1dbde4055f710cb6f83e6edd9e93a498b366.1462477116.git.jcody@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 70344
|
|
|
9ae3a8 |
O-Subject: [RHEL7.3 qemu-kvm-rhel 1/1] block jobs: qemu-kvm-rhel differentiation
|
|
|
9ae3a8 |
Bugzilla: 1156635
|
|
|
9ae3a8 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
The conditional block job disablement for RHEL left some QAPI / HMP
|
|
|
9ae3a8 |
commands in place, that are vestigial without any actual block jobs to
|
|
|
9ae3a8 |
control.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
This patch envelopes those block-job related functions in the
|
|
|
9ae3a8 |
conditional code that is disabled for RHEL:
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
block-job-set-speed
|
|
|
9ae3a8 |
block-job-cancel
|
|
|
9ae3a8 |
block-job-pause
|
|
|
9ae3a8 |
block-job-resume
|
|
|
9ae3a8 |
block-job-complete
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Jeff Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
blockdev.c | 2 +-
|
|
|
9ae3a8 |
hmp-commands.hx | 2 +-
|
|
|
9ae3a8 |
hmp.c | 2 +-
|
|
|
9ae3a8 |
qapi-schema.json | 2 +-
|
|
|
9ae3a8 |
qmp-commands.hx | 3 ---
|
|
|
9ae3a8 |
5 files changed, 4 insertions(+), 7 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/blockdev.c b/blockdev.c
|
|
|
9ae3a8 |
index b5792a2..69e951f 100644
|
|
|
9ae3a8 |
--- a/blockdev.c
|
|
|
9ae3a8 |
+++ b/blockdev.c
|
|
|
9ae3a8 |
@@ -1701,7 +1701,6 @@ void qmp_drive_mirror(const char *device, const char *target,
|
|
|
9ae3a8 |
return;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
-#endif
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static BlockJob *find_block_job(const char *device)
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
@@ -1786,6 +1785,7 @@ void qmp_block_job_complete(const char *device, Error **errp)
|
|
|
9ae3a8 |
trace_qmp_block_job_complete(job);
|
|
|
9ae3a8 |
block_job_complete(job, errp);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
+#endif
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
void qmp___com_redhat_change_backing_file(const char *device,
|
|
|
9ae3a8 |
const char *image_node_name,
|
|
|
9ae3a8 |
diff --git a/hmp-commands.hx b/hmp-commands.hx
|
|
|
9ae3a8 |
index 7e1855a..dd528d2 100644
|
|
|
9ae3a8 |
--- a/hmp-commands.hx
|
|
|
9ae3a8 |
+++ b/hmp-commands.hx
|
|
|
9ae3a8 |
@@ -81,7 +81,6 @@ ETEXI
|
|
|
9ae3a8 |
.help = "copy data from a backing file into a block device",
|
|
|
9ae3a8 |
.mhandler.cmd = hmp_block_stream,
|
|
|
9ae3a8 |
},
|
|
|
9ae3a8 |
-#endif
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
STEXI
|
|
|
9ae3a8 |
@item block_stream
|
|
|
9ae3a8 |
@@ -160,6 +159,7 @@ STEXI
|
|
|
9ae3a8 |
@findex block_job_resume
|
|
|
9ae3a8 |
Resume a paused block streaming operation.
|
|
|
9ae3a8 |
ETEXI
|
|
|
9ae3a8 |
+#endif
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
.name = "eject",
|
|
|
9ae3a8 |
diff --git a/hmp.c b/hmp.c
|
|
|
9ae3a8 |
index e1d92f4..fb9b445 100644
|
|
|
9ae3a8 |
--- a/hmp.c
|
|
|
9ae3a8 |
+++ b/hmp.c
|
|
|
9ae3a8 |
@@ -1053,7 +1053,6 @@ void hmp_block_stream(Monitor *mon, const QDict *qdict)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
hmp_handle_error(mon, &error);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
-#endif
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
void hmp_block_job_set_speed(Monitor *mon, const QDict *qdict)
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
@@ -1106,6 +1105,7 @@ void hmp_block_job_complete(Monitor *mon, const QDict *qdict)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
hmp_handle_error(mon, &error);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
+#endif
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
typedef struct MigrationStatus
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
diff --git a/qapi-schema.json b/qapi-schema.json
|
|
|
9ae3a8 |
index c8732c1..5138ed9 100644
|
|
|
9ae3a8 |
--- a/qapi-schema.json
|
|
|
9ae3a8 |
+++ b/qapi-schema.json
|
|
|
9ae3a8 |
@@ -2326,7 +2326,6 @@
|
|
|
9ae3a8 |
{ 'command': 'block-stream',
|
|
|
9ae3a8 |
'data': { 'device': 'str', '*base': 'str', '*backing-file': 'str',
|
|
|
9ae3a8 |
'*speed': 'int', '*on-error': 'BlockdevOnError' } }
|
|
|
9ae3a8 |
-#_end-rhev-only
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
##
|
|
|
9ae3a8 |
# @block-job-set-speed:
|
|
|
9ae3a8 |
@@ -2448,6 +2447,7 @@
|
|
|
9ae3a8 |
# Since: 1.3
|
|
|
9ae3a8 |
##
|
|
|
9ae3a8 |
{ 'command': 'block-job-complete', 'data': { 'device': 'str' } }
|
|
|
9ae3a8 |
+#_end-rhev-only
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
##
|
|
|
9ae3a8 |
# @ObjectTypeInfo:
|
|
|
9ae3a8 |
diff --git a/qmp-commands.hx b/qmp-commands.hx
|
|
|
9ae3a8 |
index 22a09be..9522c44 100644
|
|
|
9ae3a8 |
--- a/qmp-commands.hx
|
|
|
9ae3a8 |
+++ b/qmp-commands.hx
|
|
|
9ae3a8 |
@@ -1089,8 +1089,6 @@ Example:
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
EQMP
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-#endif
|
|
|
9ae3a8 |
-
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
.name = "block-job-set-speed",
|
|
|
9ae3a8 |
.args_type = "device:B,speed:o",
|
|
|
9ae3a8 |
@@ -1117,7 +1115,6 @@ EQMP
|
|
|
9ae3a8 |
.args_type = "device:B",
|
|
|
9ae3a8 |
.mhandler.cmd_new = qmp_marshal_input_block_job_complete,
|
|
|
9ae3a8 |
},
|
|
|
9ae3a8 |
-#ifdef CONFIG_LIVE_BLOCK_OPS
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
.name = "transaction",
|
|
|
9ae3a8 |
.args_type = "actions:q",
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|