[PATCH 14/16] qemu: block: Drop 'sheepdog' protocol support

Peter Krempa posted 16 patches 2 days, 2 hours ago
Only 9 patches received!
[PATCH 14/16] qemu: block: Drop 'sheepdog' protocol support
Posted by Peter Krempa 2 days, 2 hours ago
As now no supported qemu version supports the 'sheepdog' protocol drop
the code for configuring the blockdev layer.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_block.c | 44 ++++++-------------------------------------
 1 file changed, 6 insertions(+), 38 deletions(-)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 35dca8ee7b..eb0621463e 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -765,32 +765,6 @@ qemuBlockStorageSourceGetRBDProps(virStorageSource *src,
 }


-static virJSONValue *
-qemuBlockStorageSourceGetSheepdogProps(virStorageSource *src)
-{
-    g_autoptr(virJSONValue) serverprops = NULL;
-    virJSONValue *ret = NULL;
-
-    if (src->nhosts != 1) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("sheepdog protocol accepts only one host"));
-        return NULL;
-    }
-
-    if (!(serverprops = qemuBlockStorageSourceBuildJSONSocketAddress(&src->hosts[0])))
-        return NULL;
-
-    /* libvirt does not support the 'snap-id' and 'tag' properties */
-    if (virJSONValueObjectAdd(&ret,
-                              "a:server", &serverprops,
-                              "s:vdi", src->path,
-                              NULL) < 0)
-        return NULL;
-
-    return ret;
-}
-
-
 static virJSONValue *
 qemuBlockStorageSourceGetSshProps(virStorageSource *src)
 {
@@ -1147,12 +1121,6 @@ qemuBlockStorageSourceGetBackendProps(virStorageSource *src,
                 return NULL;
             break;

-        case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG:
-            driver = "sheepdog";
-            if (!(fileprops = qemuBlockStorageSourceGetSheepdogProps(src)))
-                return NULL;
-            break;
-
         case VIR_STORAGE_NET_PROTOCOL_SSH:
             driver = "ssh";
             if (!(fileprops = qemuBlockStorageSourceGetSshProps(src)))
@@ -1165,6 +1133,11 @@ qemuBlockStorageSourceGetBackendProps(virStorageSource *src,
                 return NULL;
             break;

+        case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG:
+            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+                           _("unsupported disk protocol"));
+            return NULL;
+
         case VIR_STORAGE_NET_PROTOCOL_NONE:
         case VIR_STORAGE_NET_PROTOCOL_LAST:
             virReportEnumRangeError(virStorageNetProtocol, src->protocol);
@@ -2430,12 +2403,6 @@ qemuBlockStorageSourceCreateGetStorageProps(virStorageSource *src,
                 return -1;
             break;

-        case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG:
-            driver = "sheepdog";
-            if (!(location = qemuBlockStorageSourceGetSheepdogProps(src)))
-                return -1;
-            break;
-
         case VIR_STORAGE_NET_PROTOCOL_SSH:
             if (srcPriv->nbdkitProcess) {
                 /* disk creation not yet supported with nbdkit, and even if it
@@ -2456,6 +2423,7 @@ qemuBlockStorageSourceCreateGetStorageProps(virStorageSource *src,
             break;

             /* unsupported/impossible */
+        case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG:
         case VIR_STORAGE_NET_PROTOCOL_NBD:
         case VIR_STORAGE_NET_PROTOCOL_ISCSI:
         case VIR_STORAGE_NET_PROTOCOL_VXHS:
-- 
2.48.1