From 7f9ceaef77b7e0b1bb23b8a599ae4b8d1ff327eb Mon Sep 17 00:00:00 2001 Message-Id: <7f9ceaef77b7e0b1bb23b8a599ae4b8d1ff327eb.1354535052.git.minovotn@redhat.com> In-Reply-To: <8d77905c18814ff2e0c9d4336f80d2d8a8fd7250.1354535052.git.minovotn@redhat.com> References: <8d77905c18814ff2e0c9d4336f80d2d8a8fd7250.1354535052.git.minovotn@redhat.com> From: Jeffrey Cody Date: Tue, 27 Nov 2012 15:37:48 +0100 Subject: [PATCH 4/4] qapi: disable block-commit command for rhel RH-Author: Jeffrey Cody Message-id: <6905b1efccb6e285abddd619905bc8923d37e988.1354030549.git.jcody@redhat.com> Patchwork-id: 44442 O-Subject: [RHEL6.4 qemu-kvm PATCH] qapi: disable block-commit command for rhel Bugzilla: 878991 RH-Acked-by: Paolo Bonzini RH-Acked-by: Markus Armbruster RH-Acked-by: Kevin Wolf RH-Acked-by: Stefan Hajnoczi As with other live block operations, block-commit should not be enabled for RHEL. The enable / disable corresponds with when live snapshots are enabled or disabled, so the CONFIG_LIVE_SNAPSHOTS configure option is used. BZ 878991 Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=5132328 Signed-off-by: Jeff Cody --- blockdev.c | 2 ++ qapi-schema.json | 2 +- qemu-monitor.hx | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) Signed-off-by: Michal Novotny --- blockdev.c | 2 ++ qapi-schema.json | 2 +- qemu-monitor.hx | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 077f887..d96f1e6 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1340,6 +1340,7 @@ int do_block_stream(Monitor *mon, const QDict *params, QObject **ret_data) return 0; } +#ifdef CONFIG_LIVE_SNAPSHOTS void qmp___com_redhat_block_commit(const char *device, bool has_base, const char *base, const char *top, bool has_speed, int64_t speed, @@ -1398,6 +1399,7 @@ void qmp___com_redhat_block_commit(const char *device, */ drive_get_ref(drive_get_by_blockdev(bs)); } +#endif static BlockJob *find_block_job(const char *device) { diff --git a/qapi-schema.json b/qapi-schema.json index 18931fb..07b84df 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2,6 +2,7 @@ # # QAPI Schema +#ifdef CONFIG_LIVE_SNAPSHOTS ## # @__com.redhat_block-commit # @@ -37,7 +38,6 @@ 'data': { 'device': 'str', '*base': 'str', 'top': 'str', '*speed': 'int' } } -#ifdef CONFIG_LIVE_SNAPSHOTS ## # @NewImageMode # diff --git a/qemu-monitor.hx b/qemu-monitor.hx index 05adea9..9689d4b 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -2262,12 +2262,14 @@ If base does not exist, BaseNotFound EQMP +#ifdef CONFIG_LIVE_SNAPSHOTS { .name = "__com.redhat_block-commit", .args_type = "device:B,base:s?,top:s,speed:o?", .user_print = monitor_user_noop, .mhandler.cmd_new = qmp_marshal_input___com_redhat_block_commit, }, +#endif { .name = "block-job-set-speed", -- 1.7.11.7