cryptospore / rpms / qemu-kvm

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