[PATCH 5/7] qemuBlockStorageSourceCreateGetFormatPropsQcow2: Add support for 'extended-l2' feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Allow creating the qcow2 with the new subcluster format if required.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_block.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 87dca40179..bff93e96ee 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -2441,18 +2441,23 @@ qemuBlockStorageSourceCreateGetFormatPropsQcow2(virStorageSource *src,
 {
     g_autoptr(virJSONValue) qcow2props = NULL;
     const char *qcow2version = NULL;
+    bool extendedL2 = false;

     if (STREQ_NULLABLE(src->compat, "0.10"))
         qcow2version = "v2";
     else if (STREQ_NULLABLE(src->compat, "1.1"))
         qcow2version = "v3";

+    if (src->features)
+        extendedL2 = virBitmapIsBitSet(src->features, VIR_STORAGE_FILE_FEATURE_EXTENDED_L2);
+
     if (virJSONValueObjectAdd(&qcow2props,
                               "s:driver", "qcow2",
                               "s:file", src->nodestorage,
                               "U:size", src->capacity,
                               "S:version", qcow2version,
                               "P:cluster-size", src->clusterSize,
+                              "B:extended-l2", extendedL2,
                               NULL) < 0)
         return -1;

-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux