|
|
a41c76 |
From eb3af538c22a06297d7f423210cbebcdd008e0c1 Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <eb3af538c22a06297d7f423210cbebcdd008e0c1@dist-git>
|
|
|
a41c76 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Date: Wed, 19 Feb 2020 15:10:18 +0100
|
|
|
a41c76 |
Subject: [PATCH] qemu: block: forbid creation of storage sources with <slice>
|
|
|
a41c76 |
MIME-Version: 1.0
|
|
|
a41c76 |
Content-Type: text/plain; charset=UTF-8
|
|
|
a41c76 |
Content-Transfer-Encoding: 8bit
|
|
|
a41c76 |
|
|
|
a41c76 |
Specifically creating such images via libvirt during blockjobs would
|
|
|
a41c76 |
be much more hassle than it's worth. Just forbid them for now.
|
|
|
a41c76 |
|
|
|
a41c76 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
(cherry picked from commit 8c4303768846834893687db68ec265ce35aab5df)
|
|
|
a41c76 |
|
|
|
a41c76 |
https://bugzilla.redhat.com/show_bug.cgi?id=1791788
|
|
|
a41c76 |
Message-Id: <756f5928f4ba944fdec54f60724194a046276a01.1582120424.git.pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
---
|
|
|
a41c76 |
src/qemu/qemu_block.c | 6 ++++++
|
|
|
a41c76 |
1 file changed, 6 insertions(+)
|
|
|
a41c76 |
|
|
|
a41c76 |
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
|
|
|
a41c76 |
index b408d4c81f..1147f4d3af 100644
|
|
|
a41c76 |
--- a/src/qemu/qemu_block.c
|
|
|
a41c76 |
+++ b/src/qemu/qemu_block.c
|
|
|
a41c76 |
@@ -2529,6 +2529,12 @@ qemuBlockStorageSourceCreate(virDomainObjPtr vm,
|
|
|
a41c76 |
int ret = -1;
|
|
|
a41c76 |
int rc;
|
|
|
a41c76 |
|
|
|
a41c76 |
+ if (src->sliceStorage) {
|
|
|
a41c76 |
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
|
|
a41c76 |
+ _("creation of images with slice type='storage' is not supported"));
|
|
|
a41c76 |
+ return -1;
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+
|
|
|
a41c76 |
if (qemuDomainObjEnterMonitorAsync(priv->driver, vm, asyncJob) < 0)
|
|
|
a41c76 |
goto cleanup;
|
|
|
a41c76 |
|
|
|
a41c76 |
--
|
|
|
a41c76 |
2.25.0
|
|
|
a41c76 |
|