From 262e3f22bd18d80808863eae3d7d422ab6b11935 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 7 May 2012 12:51:53 -0300 Subject: [RHEL6 qemu-kvm PATCH 2/3] fail drive-reopen before reaching mirroring steady state RH-Author: Paolo Bonzini Message-id: <1336395115-4138-1-git-send-email-pbonzini@redhat.com> Patchwork-id: 39605 O-Subject: [RHEL 6.3 qemu-kvm PATCH] fail drive-reopen before reaching mirroring steady state Bugzilla: 813862 RH-Acked-by: Markus Armbruster RH-Acked-by: Kevin Wolf RH-Acked-by: Laszlo Ersek Bugzilla: 813862 Upstream status: N/A Brew build: https://brewweb.devel.redhat.com/taskinfo?taskID=4375106 Stupid bug: a missing return statement causes the reopen to happen even if the error is reported. --- blockdev.c | 1 + 1 file changed, 1 insertion(+) Signed-off-by: Eduardo Habkost --- blockdev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/blockdev.c b/blockdev.c index 27ee9c1..2028a74 100644 --- a/blockdev.c +++ b/blockdev.c @@ -714,6 +714,7 @@ void qmp___com_redhat_drive_reopen(const char *device, const char *new_image_fil */ if (ret != 0) { error_set(errp, QERR_DEVICE_IN_USE, device); + return; } } if (bdrv_in_use(bs)) { -- 1.7.3.2